HTML Markup Examples

Below are some samples of commonly used code snippets demonstrated right next to their HTML tags.

Section Divisions  
Paragraph
<p> Some text </p>

Some text

Line Break
<p> Some broken <br> text </p>

Some broken
text

Horizontal Rule
Above <hr> Below
Above
Below
Text Formatting  
Main Heading
<h1> Heading 1 </h1>

Heading 1

Sub Heading
<h5> Heading 5 </h5>
Heading 5
Bold
<b> Bold text </b>
Bold text
Italics
<i> Italic text </i>
Italic text
Coloured Text
<p style="color:red;">
 Red Coloured Text </p>

Red Coloured Text

Change Font
<p style="font-family:serif;">
 Text in Serif Font</p>

Text in Serif Font

Quoted Text
<q> Quoted Text </q>
Quoted Text
Lists  
Ordered List
<ol>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ol>
  1. List item 1
  2. List item 2
  3. List item 3
Un-Ordered List
<ul>
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
</ul>
  • List item 1
  • List item 2
  • List item 3
Prev | Top Top | Next