The first, tt, renders text in a monospace font (? la
teletype text). The others, sub and sup, render text as subscript and superscript text,
respectively. These are useful for scientific documents, although there is a drawback: characters
are displayed at the same size, defined by the browser. You can get around this by
using a CSS tag selector and defining a new font size for each element. The following code
shows how to do this, and the accompanying screenshot shows a default sup element (at
the top of the image) and a CSS-styled sup element (at the bottom) in use.
sup {
font-size: 70%;
}
WORKING WITH TYPE
67
3
Logical styles for programming-oriented content
Several logical styles do similar jobs, are programming-oriented, and are usually displayed
in a monospace font:
Denotes a code sample.Indicates text entered by the user.Indicates a programming sample.The var element also relates to programming, signifying a variable. However, it is usually
displayed in italics.
Block quotes, quote citations, and definitions
The blockquote element is used to define a lengthy quotation and must be set within a
block-level element. Its cite attribute can be used to define the online location of quoted
material, although the cite element is perhaps more useful for this, enabling you to place
a visible citation (a reference to another document, such as an article) online; this is usually
displayed in italics.
Pages:
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135