Character Formatting (which should be rendered distinctly from non-formatted
text) allows the author in-line control over changes to content, whereas
the other basic formatting mode, Block Formatting,
defines content into vertically distinct sections from surrounding text.
A visual browser will usually render Character Formatting changes in place
while Block Formatting will render any applicable formatting plus an
additional implied line break before and after the content block.
The main intent of SGML (and the derivative HTML language) is to be
a device independent language for describing the content of documents. To
accomplish this, it tries to divorce presentation rules from textual
content. Most HTML elements are not intended to give direct control to
the author over how the final layout will look, but many Character
Formatting elements (especially many of the newer ones) now give an
author this control.
Physical Vs. Virtual Character
Formatting Styles
There are two classes of character formatting styles - Physical
styles (sometimes referred to as "typographical") and Virtual
styles (sometimes referred to as "logical" or "idiomatic".)
Each Physical style should be rendered distinctly from other
Physical styles, while each Virtual style should be rendered distinctly
from other Virtual styles. Many of the Physical styles are the common
visual rendering analog for Virtual styles (i.e.:
strong emphasis <strong> is usually rendered as
boldface: <b>)
Physical styles explicitly describe what the final appearance of
the contained text should look like. If the rendering device does not
have the capability to produce the indicated Physical style (such as a
browser for the visually impaired), this formatting may be lost. Note:
The new ILayer element from Netscape is somewhat of an anomaly here. The
nature of its display effects are unlike any of the other physical styles.
Virtual styles purposefully do not include any final rendering
hints in their definitions. These styles describe instead how the
contained text is used in the context of the document. The main benefit
of such elements is when a document is experienced using a method
OTHER than a standard screen-based visual environment; the
INTENT of the content can be preserved.
Which Styles to Use?
The original HTML 2.0 specification contained all the Virtual
styles listed above, while including only a few of the listed Physical
styles. The many Physical styles now available are more recent and reflect
a demand from authors for more explicit rendering control. To improve
portability though, it is usually recommended to use Virtual styles
rather than Physical in your documents. Example: Use of the
<i> element to render text in italics will
only be effective on those browsers which are capable of displaying
italics. Not all browsers are guaranteed to have this ability. It is
often better to use logical styles such as <em>
which specify that the contents need emphasis of SOME sort,
regardless of the presentation mode.
The introduction of Style Sheets has added two new HTML elements to
allow for generic tagging situations where no specific HTML markup would
be appropriate. The SPAN element (and its companion
Block Formatting element DIV) has no real inherent
semantic purpose assigned to its structure - the author can assign Style
Sheet presentation properties as needed.