03
 

Headings

Starting a line with a hash character will make the line a header. The number of hashes corresponds to the level of the header (one to six).

Click on the red points to know more. Move through the exercises by using the buttons or the dot menu at the bottom.

Click on the red points to know more. Move through the exercises by using the buttons or by swiping left or right.

#Heading1 ##Heading2 ###Heading3 ####Heading4 #####Heading5 ######Heading6
  • More

    In fact, for heading levels one and two, Markdown supports two styles.
    For level one you can use one hash character, or equal signs in this way:
    Heading 1
    =========
    (Any number of underlining = will do).

    Close
  • More

    Optionally, at the end of the text, you can put more hashes to "close" the header. The closing hashes don’t need to match the number of hashes used at the beginning.

    Close
  • More

    For level two, you can also use dashes in this way: Heading 2
    ---------
    (Any number of underlining - will do).

    Close

Using one of the two available syntaxes, format the text "April 18, 1938" as a level two header.

Show generated HTML?

Play with the concepts you just learned!

For example:
What happens when you have more than six hash characters at the beginning of the line?
What happens when you surround the formatting characters (equals signs or dashes) with spaces? Or remove them (hashes)?
What happens when you use bold and italics in a header?

See the generated HTML. Even if you don't know HTML, try to understand what's happening. Go wild!
Go to the next lesson when you're ready.

Show generated HTML?

Go to the next lesson