Markdown
“Easy reading is damn hard writing.” — Nathaniel Hawthorne
Table of contents
Blockquote style
Use lazy form, where only the first line is prefixed with a blockquote character, subsequent lines are prefixed with indentation.
Before | After |
---|---|
|
|
Emphasis style
Stylize text with asterisks while underscores act as subsequent highlights.
Before | After |
---|---|
|
|
Fenced code style
Use backticks to create fenced code blocks, not the optional 4 spaces indentation.
Before | After |
---|---|
|
|
Header style
ATX headings are preferred over Setext headings. Setext headings are long and do not support over 2 levels of headings.
Before | After |
---|---|
|
|
Lists
Unordered list style
Use hyphens to create unordered lists and nested lists. Asterisk is already associated with highlights, and plus is not as common.
Before | After |
---|---|
|
|
Ordered list style
Google: Use lazy numbering for long lists
Use fixed numbers for ordered lists to avoid confusion with nested lists. There should be four spaces after the period to better align with nested list items.
Before | After |
---|---|
|
|
Table
Optional table pipe
Never use the optional pipe at each side of the table.
Before | After |
---|---|
|
|
Wrap table cell
Always wrap the cell content and pad with a space on each end. Column alignment line should be 3 dashes and optional colon.
Before | After |
---|---|
|
|
Formatting
Max line length
Keep characters in a line to a maximum of 80 characters.
Separate a link to a new line only if the text (not the link) exceeds 80 characters. In the example below, a paragraph is not split because [hyperlink]
can still fit in the first column even though the link is more than 80 characters.
Before | After |
---|---|
|
|
Vertical spacing
Separate headings, paragraph, and everything in between with 1 blank line. Extra lines are ignored when rendered.
Before | After |
---|---|
|
|