Chapter 4. Basic (X)HTML Formatting
While it’s a good idea to try to separate formatting from content and to use style sheets for controlling the appearance of your page, there are a few simple (and still legal) ways to format text in (X)HTML that I will discuss in this chapter.
Why should you use basic (X)HTML formatting instead of CSS? There are two main reasons. First, most of the elements discussed in this chapter are logical elements, that is, they give structure to your document by describing what they contain. For example, the code
element is specifically designed for formatting lines of code from a script or program. While it formats such content in a monospace font, it also more importantly identifies the text as code.
The second reason ...
Get HTML for the World Wide Web, Fifth Edition, with XHTML and CSS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.