HTML Basics
Stanford University Libraries & Academic Information Resources

Highlighting elements

 [Previous Page]  [Tutorial Top]  [Tech Guide]  [Next Page]

HTML provides a number of highlighting elements (or what the HTML 2.0 specification calls Character-Level Elements), which "are used to specify either the logical meaning or the physical appearance of marked text without causing a paragraph break." These are usually described as falling into one of two classes:

Logical styles
Known also as "logical highlighting" or, in the language of the HTML specification, "Information Type Elements" these tags identify some partcicular characteristic or function of the text. Frequently misused, they are meant to indicate something about the meaning of the text, not to achieve a typographic effect

The commonly used logical style elements are:

Physical styles
Known also as "physical highlighting" or, in the language of the HTML specification, "Character format elements", these elements are used to indicate a strictly typographic effect. Whenever the function of the markup is to indicate emphasis or a cited work, then <em>, <strong>, or <cite> are always preferred to the physical style tags. These tags are used when it is necessary to distinguish some piece of text in order to clarify the meaning of the text.

Only the first two of these are in very common use, though the third is occasionally of use:

Other less commonly use tags in this category are described in the Technical Reference Guide to the HTML 2.0 Document Type Definition

Note that for all highlighting tags, the end-tag is required, which makes sense. If you forgot to "turn off" boldfacing, the rest of your document would be rendered in bold.

Example

    <p>Fortunately, the corpus of English writing isn't (lately)
    overfilled with works that provide examples of all the highlighting
    styles in a single text, so this discourse on the concept
    <i>nature</i>, drawn from
    <cite>Endgame</cite> is quite fabricated.</p>

    <blockquote>

    <p><b>HAMM</b><br>
    Nature has forgotten us.</p>

    <p><b>CLOV</b><br>
    There's <em>no more</em> nature</p>

    <p><b>HAMM</b><br>
    <strong>No more nature!</strong> You exaggerate.</p>

    </blockquote>

    <p>but I can just imagine the headlines now:
    <tt>No more nature</tt> (and <em>boy</em>, did I have to stretch
    for this one.</p>

Which is rendered (as if it hasn't been rendered enough already) thus:

Fortunately, the corpus of English writing isn't (lately) overfilled with works that provide examples of all the highlighting styles in a single text, so this discourse on the concept nature, drawn from Endgame is quite fabricated.

HAMM
Nature has forgotten us.

CLOV
There's no more nature

HAMM
No more nature! You exaggerate.

but I can just imagine the headlines now: No more nature (and boy, did I have to stretch for this one.

Cautions

Highlighting tags be used within Headings if and only if the content of the heading demands it.. Highlighting may not be used simply to achieve a visual effect (which as always in HTML, is the purview of the reader, not the author). The following, for example, is appropriate:

    <h1>Sources for <cite>Moby Dick</cite></h1>

In no case may highlighting tags surround a heading. The following is always illegal:

        <b><h2>What I said</h2><./b>

but this is legal:

        <h2>Not what I <em>meant</em></h2>

 [Previous Page]  [Tutorial Top]  [Tech Guide]  [Next Page]


Walter Henry
Stanford University Libraries and Academic Information Resources