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 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. The following sections cover the various means possible for historical and completeness purposes.
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, and the
color attribute is used to change the ...