Amaya

Character style elements in HTML

What NOT to do and how it should be done...

HTML 4.0 (Strict) includes some elements which provide character styles. These elements should be replaced by the use of structural elements or style sheets wherever possible.

All the elements in question except PRE are found in the Character Element submenu of the XHTML menu:

b and i
These should be replaced by use of the strong and em elements where they are used to provide emphasis for a word or phrase. There are special elements to denote headings, terms that are being defined, and certain special uses, such as a quotation, piece of computer code, etc. If the elements are simply being used to provide heavier font style sheets should be used instead
big and small
In general these effects should be achieved with style sheets. Where they are used to denote specific types of information such as the source of a quotation, sample computer input or output, etc, there are appropriate HTML elements that should be used.
sub and sup
Style sheets should be used to achieve the presentation effects of these elements. In cases such as mathematical expressions, an appropriate markup language such as MathML should be used where possible.
tt and pre
Authors should use style sheets to achieve these effects.