IN THIS CHAPTER
Methods of Text Control
Bold and Italic Text
Use of Emphasis Instead of Italics
Monospace (Typewriter) Fonts
Superscripts and Subscripts
Marking Editorial Insertions and Deletions
Grouping Inline Elements with the Span Tag
Although the modern-day Web is a haven of multimedia, text is still vitally important. Only through text can some messages be succinctly communicated. Even then, diversity in text can help further clarify a message. For example, emphasizing one word with bold or italic font can change the entire tone and meaning of a sentence.
This chapter discusses the tags you can use to format elements inside of block elements (characters, words, or sentences inside of paragraphs).
You can control the look and formatting of text in your documents using various means. It should come as no surprise that the more direct methods—
<font> tags and the like—have been deprecated in favor of CSS controls in HTML 4.01 and XHTML. For historical context and completeness, the following sections cover the various means possible.
Although it is sometimes easier to drop a direct formatting tag into text, resist the urge and use styles instead. Your documents will be more flexible and more standards-compliant.
<font> tag enables you to directly affect the size and color of text. Intuitively, the
size attribute is used to change the text's size; the
color attribute is used to change the color. ...