The main page header of this guide is an h1 element. Any header elements may include links, as depicted in the example.
The secondary header above is an h2 element, which may be used for any form of important page-level header. More than one may be used per page. Consider using an h2 unless you need a header level of less importance, or as a sub-header to an existing h2 element.
The header above is an h3 element, which may be used for any form of page-level header which falls below the h2 header in a document hierarchy.
The header above is an h4 element, which may be used for any form of page-level header which falls below the h3 header in a document hierarchy.
The header above is an h5 element, which may be used for any form of page-level header which falls below the h4 header in a document hierarchy.
All paragraphs are wrapped in p tags. Additionally, p elements can be wrapped with a blockquote element if the p element is indeed a quote. Historically, blockquote has been used purely to force indents, but this is now achieved using CSS. Reserve blockquote for quotes.
The ol element denotes an ordered list, and various numbering schemes are available through the CSS (including 1,2,3… a,b,c… i,ii,iii… and so on). Each item requires a surrounding and tag, to denote individual items within the list (as you may have guessed, li stands for list item).
- This is an ordered list.
- This is the second item, which contains a sub list
- This is the sub list, which is also ordered.
- It has two items.
- This is the final item on this list.
The ul element denotes an unordered list (ie. a list of loose items that don’t require numbering, or a bulleted list). Again, each item requires a surrounding and tag, to denote individual items. Here is an example list showing the constituent parts of the British Isles:
- United Kingdom of Great Britain and Northern Ireland:
- Northern Ireland
- Republic of Ireland
- Isle of Man
- Channel Islands:
- Bailiwick of Guernsey
- Bailiwick of Jersey
Sometimes we may want each list item to contain block elements, typically a paragraph or two.
- The British Isles is an archipelago consisting of the two large islands of Great Britain and Ireland, and many smaller surrounding islands.
- Great Britain is the largest island of the archipelago. Ireland is the second largest island of the archipelago and lies directly to the west of Great Britain.
- The full list of islands in the British Isles includes over 1,000 islands, of which 51 have an area larger than 20 km2.
There are a number of inline HTML elements you may use anywhere within other elements.
Links and anchors
The a element is used to hyperlink text, be that to another page, a named fragment on the current page or any other location on the web.
The em element is used to denote text with stressed emphasis, i.e., something you’d pronounce differently. Where italicizing is required for stylistic differentiation, the i element may be preferable.
You simply must try the negitoro maki!
The strong element is used to denote text with strong importance. Where bolding is used for stylistic differentiation, the b element may be preferable.
Don’t stick nails in the electrical outlet.
The s element is used to represent content that is no longer accurate or relevant. When indicating document edits i.e., marking a span of text as having been removed from a document, use the del element instead.
Recommended retail price: £3.99 per bottle Now selling for just £2.99 a bottle!
The cite element is used to represent the title of a work (e.g. a book, essay, poem, song, film, TV show, sculpture, painting, musical, exhibition, etc). This can be a work that is being quoted or referenced in detail (i.e. a citation), or it can just be a work that is mentioned in passing.
Universal Declaration of Human Rights, United Nations, December 1948. Adopted by General Assembly resolution 217 A (III).
Superscript and subscript text
The sup element represents a superscript and the sub element represents a sub. These elements must be used only to mark up typographical conventions with specific meanings, not for typographical presentation. As a guide, only use these elements if their absence would change the meaning of the content.
The coordinate of the ith point is (xi, yi). For example, the 10th point has coordinate (x10, y10).
f(x, n) = log4xn
The i element is used for text in an alternate voice or mood, or otherwise offset from the normal prose. Examples include taxonomic designations, technical terms, idiomatic phrases from another language, the name of a ship or other spans of text whose typographic presentation is typically italicised.
There is a certain je ne sais quoi in the air.
The b element is used for text stylistically offset from normal prose without conveying extra importance, such as key words in a document abstract, product names in a review, or other spans of text whose typographic presentation is typically emboldened.
You enter a small room. Your sword glows brighter. A rat scurries past the corner wall.
Tables should be used when displaying tabular data. The thead, tfoot and tbody elements enable you to group rows within each a table.
If you use these elements, you must use every element. They should appear in this order: thead,tfoot and tbody, so that browsers can render the foot before receiving all the data. You must use these tags within the table element.
|Ingredients||Serves 12||Serves 24|
|Milk||1 quart||2 quarts|
|Vanilla Bean, Split||1||2|
|Mace||10 blades||20 blades|
|Cups Sugar||1 1/2 cups||3 cups|
|Dark Rum||1 1/2 cups||3 cups|
|Brandy||1 1/2 cups||3 cups|
|Vanilla||1 tbsp||2 tbsp|
|Half-and-half or Light Cream||1 quart||2 quarts|
Custom Styled Elements
Rounded images can be aligned left or right.