Next | Previous | Contents |
Headings are for identifying various parts of the text. They are inline (though normal usage at the beginning of a document or of a division makes them look like block material). Here are headers as they normally would be found. Each first comes at the start of its own division (the previous division always ends with a paragraph), and then as inline material at the start of a separate paragraph.
The standard doesn't say it, but at least as styled by Netscape Navigator and Microsoft Internet Explorer, H1, H2 and H3 are more suitable as block-level material, while H4, H5 and H6 have a font size equal or smaller than the body text, so they seem better inline within the paragraph. The HTML 4.0 standard specifies that all the headers are inline material. Thus an enclosing style such as <DIV>, or a <BR>, is needed to produce a line break before the heading, and typically <P> provides the line break after it.
Unfortunately, in HTML 2.0 and 3.2 the H elements clearly were able to end a block by themselves (<DIV> did not exist then), many web pages depend on this behavior, and popular browsers render all H elements as blocks, not inline. For backward compatibility it would be best if an H element would close a previous block but its ending would appear to be inline, requiring a following <P> if the author wants it to close.
First paragraph of division.
First paragraph of division.
First paragraph of division.
First paragraph of division.
First paragraph of division.
First paragraph of division.
CENTER is an extremely deprecated tag, not even mentioned in the HTML 4.0 standard. Nonetheless it is often used with headings to center the text. It is a block level tag, and a similar effect can be obtained with <P ALIGN=CENTER> or <H1 ALIGN=CENTER> (but the latter forms are also deprecated in favor of CSS style effects). Here's one following immediately after this sentence.
Next | Previous | Contents |