Underused & Easily-forgotten HTML guide

This is not a HTML tutorial. It is a quick-reference for my own uses.

Levels of headings

Level 1 heading

Level 2 heading

Level 3 heading

Level 4 heading

Level 5 heading
Level 6 heading

An unordered list

An ordered list

  1. alpha
  2. beta
  3. gamma

Nested lists example

Please note that an <ul> or an <ol> cannot appear immediately inside an <ul> or an <ol>, so if you are a standards freak and would like all your web-pages to validate, then you will need to wrap any nested lists in <li> tags. This paragraph also demonstrates one way in which you can emphasise blocks of text.

  1. alpha
  2. beta
  3. gamma
    1. one
      1. A
      2. B
      3. C
    2. two
    3. three
  4. delta

definition list

alpha beta gamma
alpha beta gamma
alpha beta gamma

This is a paragraph that includes both emphasised and strongly emphasised text.

Sample blockquote example.


NATO is an acronym and abbr is an abbreviation. You should see a "tool-tip" appear when you hover your mouse over the words "NATO" and "abbr" in the previous sentence. Unfortunately, I don't think IE supports <abbr> so you will have to use <acronym> instead.

Simple Tables

table caption

Repeating headers and footers

For printing purposes, table headers and footers can be printed on every page when the table is large. All you need to do is to use <thead>, <tbody> and <tfoot> to surround your table header, main table body and table footer. Gecko-based browsers will print the headers and footers on every page automatically, IE will need further prodding with the following CSS:

thead {display: table-header-group;}
tfoot {display: table-footer-group;}

An example of this in action can be seen on my character entities page. According to the HTML spec, the <tfoot> must preceed the <tbody>.

Complex Table

Below is an example of a standards-compliant table where the visual presentation needed to conform to a reasonably strict format.

test product 1tbd$44.00$44.00
test product 2tbd$38.00$38.00


In the following examples, note that you can click on an element's label to give focus to that element. This is achieved by using the html <label> markup.

Sample Form Elements: