Text Attribute ElementsThis is something you need to get used to as an HTML author--many of
the decisions about exactly how your document looks aren't really up
to you. Instead, they're in the hands of the person who is reading
your document (or determined by the limitations or features of the
browser that that person is using).
Note: Many browsers now implement an HTML 4.0 feature called
Cascading Style Sheets (CSS) designed to let users specify
the behavior of HTML elements to a certain extent. This is covered in the
Advanced HTML seminar.
Nevertheless, there are a number of elements that reflect a difference in the purpose of a piece of text by changing how that text is displayed. These are the text attribute elements.
In keeping with the philosophy of specifying function, rather than form, there are two tags that are used to indicate emphasis. These are the <EM> </EM> tag, for normal emphasis, and the <STRONG> </STRONG> tag, for even more emphasis. Both are paired tags. The effect they have is as follows:
There are times when you might want to exert more explicit control over how an item gets displayed. For these times, there are elements that you can use. The <B> </B> tag specifies boldface, the <I> </I> tag specifies italics. Of course, some browsers (such as Lynx) may not be able to display these, and so might still interpret them in another way. The B and I tags are both paired tags.
As you can imagine, there are two ways to indicate size of text, one descriptive and one proscriptive
You can use the BIG <BIG> </BIG> and SMALL <SMALL></SMALL> elements to indicate that text should be larger or smaller than usual:
The FONT element changes the physical description of the text inside the element. FONT has an attribute SIZE which changes the size of the text. (Another FONT attribute, COLOR, will be discussed in Day 3.) Font sizes are indicated as +1, +2, +3, +4 (bigger than normal) and -1, -2 (smaller than normal).
Other elements that are used to indicate text attributes include: CITE (the title of a cited work), BLOCKQUOTE (indented and set off block quote from text), CODE (computer code) and ADDRESS (computer email address).
For more information, see the Style section of the HTML Chart.