An overview of all Markdown elements

This post provides an overview of all the Markdown elements and how they are rendered by this theme. Use it as a reference and as a visual test page.

Block Elements

Paragraphs and Line Breaks

A paragraph is one or more consecutive lines of text separated by one or more blank lines.

This will be inline.

This is second paragraph.

To produce a line break, end a line with two or more spaces. This will be not inline.

Headers

Markdown supports two styles of headers, Setext and atx.

This is an H1
=============

This is an H2
-------------

# This is an H1
## This is an H2
###### This is an H6

Rendered:

This is an H4

This is an H5
This is an H6

Blockquotes

This is a blockquote with two paragraphs. Donec sit amet nisl. Aliquam semper ipsum sit amet velit.

This is nested blockquote.

Lists

Unordered:

  • Red
  • Green
  • Blue

Ordered:

  1. Bird
  2. McHale
  3. Parish

Nested:

  • A
    • A1
    • A2
  • B
  • C

Code Blocks

An indented code block:

<div class="footer">
    &copy; 2004 Foo Corporation
</div>

A fenced code block with a language hint (hover it for the copy button):

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

Horizontal Rules




Table

LeftCenterRight
aaabbbccc
dddeeefff

Span Elements

An inline link, and a reference-style link.

Emphasis

single asterisks and single underscores for italic; double asterisks and double underscores for bold.

Code

Use backticks for printf(). To include a literal backtick, use double backticks (`) like this.

Images

Alt text

Strikethrough

Mistaken text.

Miscellaneous

http://example.com/ and address@example.com.

Backslash Escapes

Use a backslash to produce literal characters: *literal asterisks*.

Inline HTML

When you need something Markdown doesn’t cover, drop down to raw HTML. Span-level HTML is processed inline, block-level HTML is left alone:

Work renders the emphasis, but

No Work
does not.