Apart from the elements at the topmost levels, namely HTML, HEAD and BODY, the HTML elements are classified into three major categories:
Any text element (including plain text) can appear wherever a block element is allowed.
A rule of thumb which may help in remembering which elements are block elements and which are text elements: block elements cause paragraph breaks, text elements do not.
Note: Often block elements can contain both text elements and
other block elements, i.e. blocks can be nested.
Text elements can be nested, too.
On the other hand,
text elements may not contain block elements.
For example,
<CITE><H3>Origin of Species</H3></CITE>
is invalid (since CITE
is text element and H3 is block element)
and also illogical (you don't really mean that the heading
as a structure
is a citation, do you?)
whereas
<H3><CITE>Origin of Species</CITE></H3>
would be legal, although different browsers might treat it differently
(letting either H3 or CITE determine the rendering, or possibly
using a mixture of the two).
Similarly, don't embed
headings into A NAME
tags but vice versa.
It is also illegal to have a paragraph break (P tag)
within e.g. a STRONG element; although several
browsers can handle it, the semantics is ambiguous and you should use
separate start and end STRONG tags within each paragraph (if you really
want to emphasize such large portions of text!).