Markdown Syntax Guide
This article offers a sample of basic Markdown syntax that can be used in Hugo content files. As more elements are added or supported, this post will be updated to reflect those examples.
Headings
The following HTML elements <h2> through <h6> represent 5 levels of section
headings. <h2> is the highest section level while <h6> is the lowest. <h1>
is a special case that should be reserved for the automatically generated title
of the page (typically only occurring once).
H2
H3
H4
H5
H6
Paragraphs
Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
Inline Formatting Options for Bold, Italic, Code, Strikethrough, and Links
Spans of text can be bold, italic, bold italic, or
strikethrough. Use single backticks for inline code.
External links to other sites open in a new tab. Internal links stay in the same tab.
Blockquotes
The blockquote element represents content that is quoted from another source.
Blockquotes Without Attribution
Tiam, ad mint andaepu dandae nostion secatur sequo quae.
Note that you can use Markdown syntax within a blockquote.
Blockquotes With Attribution
Don’t communicate by sharing memory, share memory by communicating.
— Rob Pike1
Tables
Tables aren’t officially supported by the Markdown spec, but Hugo supports them out-of-the-box. You can also add formatting within these tables.
| Italics | Bold | Code |
|---|---|---|
| italics | bold | code |
Codeblocks
The codeblock contains programatic content with automatic syntax highlighitng. When JavaScript is enabled, there is also a copy button.
Codeblock With Backticks
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>Codeblock With Highlight Shortcode
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>Lists
Ordered Lists
- First item
- Second item
- Third item
Unordered Lists
- List item
- Another item
- And another item
Nested Lists
- Fruit
- Apple
- Orange
- Banana
- Dairy
- Milk
- Cheese