demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 3.8K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Headings and Paragraphs

html / elements

Estimated reading time: 1 minute, 6 seconds

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, although this may generate issues with some 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 mark paragraphs. Keep in mind that the content of every paragraph must be contained within an opening and closing <p> tag in XHTML. 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.

comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.