Check out Symmetric Chess, our featured variant for March, 2024.

HTML vs Markdown

This is a quick style guide for using HTML or Markdown. Hypertext Markup Language, known by the abbreviation HTML, is the most commonly used language for spelling out the structure of web pages, because all web browsers understand it natively. Markdown is a newer markup language that requires less code, because it makes use of standard conventions used in writing plain text documents. While HTML offers more to the power user, Markdown can be a more convenient way to write if you don't know HTML or don't need its full power. On this site, you can use either Markdown or HTML to write comments or post content on pages. Since browsers do not understand Markdown natively, your Markdown will be converted to HTML before it's displayed. This page will cover various features of Markdown, showing the HTML it converts to, and showing what it looks like when displayed. To do this, Markdown will be converted to HTML with a conversion function. So, what you see will be specific to how Markdown is used on this site, and it may not apply to reddit or other sites that also let you write in Markdown.

Headings




First Level Heading

Second Level Heading

Third Level Heading

Headings are used to introduce new sections. When posting submissions, the first and second level headings will be automatically added, and you should begin with third level headings. In Markdown, place three # signs before the heading text. In HTML, surround it with opening and closing <h3> tags.

Fourth Level Heading

Fifth Level Heading
Sixth Level Heading

Since HTML has no more than six heading levels, this will not work:

####### Seventh Level Heading

Paragraphs




In Markdown, paragraphs are separated simply by blank lines. If one body of text is followed by a blank line, it is considered a different paragraph than the one that follows.

Here is another paragraph. In HTML, each paragraph must be surrounded by <p> and </p> tags, and they may appear without any blank lines between them.

Block Quotes




Block quotes can be used in comments to identify text written by someone else. In Markdown, indicate a block quote by putting a greater than sign at the beginning of the line. In HTML, enclose your text between opening and closing <blockquote> tags.

You can respond to the text in a block quote with a normal paragraph.

Inline Styles




In Markdown, you can indicate italics by surrounding a word with a single * or _ on each side. Boldface takes two on each side, and bold italics takes three. In earlier sections, you also saw the use of backticks to identify HTML code that was supposed to be displayed as text instead of interpreted. For HTML, you can do italics with either <i> or <em> tags, and you can do boldface with either <b> or <strong> tags.

HTML, though not Markdown, will let you underline text by surrounding your text with <u> tags. But you can mix HTML into Markdown, and it will still work as HTML after the Markdown has been translated to HTML

Bulleted Lists




  • This is the first item of a bulleted list.
  • In Markdown, a bulleted list item starts with an asterisk.
  • These can be useful for listing the rules of games.
    • If you indent the list item by four spaces in Markdown, you can get a sublist item.
    • In HTML, you have to nest one list inside another.
      • And you can nest lists even further, as seen here.
  • Changing the bullet at the base level will start a new list.

  • Skipping a line will mark the list item as a paragraph, which looks the same as starting a new list.

Ordered Lists




  1. This is the first item of an ordered list.
  2. In Markdown, an ordered list item starts with a numeral and a period.
  3. These can be useful for listing the rules of games.
    1. If you indent the list item by four spaces in Markdown and also restart the numbering, you can get a sublist item.
    2. In HTML, you have to nest one list inside another.
      1. And you can nest lists even further, as seen here.

Definition Lists




A definition list
A list of terms with definitions.
An HTML construct using the tags <DL>, <DT> and <DD>.
A term
In Markdown, a definition should come after a colon.
Another definition could come after another colon
Each definition will be indented from the term.

Links




To insert a link in Markdown, place the text for the link in brackets, followed by the URL in parentheses. In HTML, use the <A> tag. Assign the URL to the value of HREF, and enclose the link text between the opening and closing <A> tags

The Chess Variant Pages

Note that you should normally use relative URLs for pages on this site. These will begin with / and omit the domain. For example:

Shogi

Images




To display an image in Markdown, it works almost the same way as adding a link, but you must add an exclamation mark before the brackets. After the exclamation mark, place the ALT text in the brackets, and place the URL in parentheses. The ALT text is text that will show up if the image cannot be displayed. It may be used to tell what the image is and to provide a download link to it.

diagram

The image shown above was generated by the Diagram Designer, which is a useful tool for producing board diagrams you can use on your pages. You may also upload your own images with the File Manager, which you'll find in the Edit menu for your page. Be sure to use only .gif, .jpg, or .png images.

For HTML, use the <img> tag. Assign the ALT text to alt and the URL to src, as illustrated below:

<img src="/cvp-logo-small.png" alt="logo">
logo

As with links, use relative URLs for images on this site.

Preformatted Text




Preformatted text is to be displayed exactly
as you have entered it. In Markdown, you can 
indicate preformatted text by indenting it 
four spaces. This is fine for short pieces 
of text, but not for longer text. 

For longer text, place a separate line
of three tildes before and after the text.
This can be useful for displaying ASCII 
diagrams, though they are not encouraged.
In HTML, surround preformatted text with
<pre> and </pre> tags.
    a   b   c   d   e   f   g   h   i   j   k    
                        ___                       
                    ___/ b \___                  8
                ___/:q:\___/:k:\___               
            ___/!n!\___/!b!\___/!n!\___          7
        ___/ r \___/   \___/   \___/ r \___       
    ___/:p:\___/:::\___/:b:\___/:::\___/:p:\___  6
   /!!!\___/!p!\___/!!!\___/!!!\___/!p!\___/!!!\  
11 \___/   \___/ p \___/   \___/ p \___/   \___/ 5
   /:::\___/:::\___/:p:\___/:p:\___/:::\___/:::\  
10 \___/!!!\___/!!!\___/!p!\___/!!!\___/!!!\___/ 4
   /   \___/   \___/   \___/   \___/   \___/   \  
 9 \___/:::\___/:::\___/:::\___/:::\___/:::\___/ 3
   /!!!\___/!!!\___/!!!\___/!!!\___/!!!\___/!!!\  
 8 \___/   \___/   \___/ P \___/   \___/   \___/ 2
   /:::\___/:::\___/:P:\___/:P:\___/:::\___/:::\  
 7 \___/!!!\___/!P!\___/!!!\___/!P!\___/!!!\___/ 1
   /   \___/ P \___/   \___/   \___/ P \___/   \  
 6 \___/:P:\___/:::\___/:B:\___/:::\___/:P:\___/  
       \___/!R!\___/!!!\___/!!!\___/!R!\___/      
 5         \___/ N \___/ B \___/ N \___/          
               \___/:Q:\___/:K:\___/              
 4                 \___/!B!\___/                  
                       \___/                      
     a   b   c   d   e   f   g   h   i   j   k    
Note that <b>HTML tags</b> and Markdown's
**inline styles** are displayed rather 
than <u>interpreted</u> in the way Markdown
handles preformatted text.