This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
Headings
The following HTML <h1>
—<h6>
elements represent six levels of section headings. <h1>
is the highest section level while <h6>
is the lowest.
H1
H2
H3
H4
H5
H6
Paragraph
This is the first paragraph.
Now this is the second paragraph.
Blockquotes
The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer
or cite
element, and optionally with in-line changes such as annotations and abbreviations.
Blockquote without attribution
Note that you can use Markdown syntax within a blockquote.
Blockquote with attribution
Don’t communicate by sharing memory, share memory by communicating.
— Rob Pike1
Tables
Tables aren’t part of the core Markdown spec, but some platform supports them out-of-the-box. Like in this HUGO platform.
Name | Age |
---|---|
Bob | 27 |
Alice | 23 |
Inline Markdown within tables
Inline | Markdown | In | Table |
---|---|---|---|
italics | bold | code |
Code Blocks
Code block with backticks, programming language can be specified after the backticks
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block indented with four spaces
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example HTML5 Document</title>
</head>
<body>
<p>Test</p>
</body>
</html>
Code block with Hugo’s internal highlight shortcode
|
|
List Types
Ordered List
- First item
- Second item
- Third item
Unordered List
-
List item
-
Another item
-
And another item
-
List item
- Secondary list item with more than 2 space in front
Nested list
- Item
- First Sub-item
- Second Sub-item
Other Elements — abbr, sub, sup, kbd, mark
GIF is a bitmap image format.
H2O
Xn + Yn: Zn
Press CTRL+ALT+Delete to end the session.
The highlighter is useful in many cases.