demosthenes.info

A blog by Dudley Storey on , , , , , , and anything else that strikes his fancy.

featured articles

popular favourites

Headings and Paragraphs

A typical web page will have a structure similar to most real-world documents: a title, heading, body copy (in the form of paragraphs) and several sub-headings dividing the body copy into different sections.

Headings

HTML has six heading levels, from <h1> to <h6>. It is very important not to think of these headings in terms of “size” or “bigness”, but as levels of importance. <h1> is the most important heading in the web page, and is commonly the first element after the opening <body> tag. In an XHTML document <h1> is typically only used once per page, and may contain content that is related to the page title, the company name, or the name of the website. (It is possible for HTML5 pages to use the h1 element multiple times in different contexts, but as of this writing that is not generally recommended, due to issues with accessibility software. <h2>, on the other hand, is a sub-heading, of which there may be several in a document. <h3> is a sub-sub-heading, and so on.

Paragraphs

<p> tags demark paragraphs. Keep in mind that the content of every paragraph must be contained within an opening and closing <p> tag. A paragraph normally consists of several sentences; if <p> content consists of a single word or image, you should probably reconsider and use more appropriate markup.

web developer guide

featured comment

by JoelB in Goodbye, JQuery Validation: HTML5 Form Errors With CSS3

what i'm reading

A Storm of Swords: A Song of Ice and Fire: Book Three
A Storm of Swords: A Song of Ice and Fire: Book Three

what i'm watching

Californication: The Third Season
Californication: The Third Season

what i'm playing

Mass Effect 3 Collector's Edition
Mass Effect 3 Collector's Edition

what i'm hearing

Dub FX
Dub FX

blogs

podcasts

no ads ever

This blog is free of advertising, and always will be.

creative commons licensed

The content of this blog is free to use in whatever way you wish under the Creative Commons license.