IN THIS CHAPTER
The Web is used to transfer information in a variety of formats. However, text is still the main form of communication across the Internet and even on the multimedia-rich World Wide Web. As such, it is important to understand the methods you can employ with HTML to format text.
This chapter covers the big picture, that is, text at the division and paragraph level. The next chapter delves into character and other in-line formatting concepts.
The most basic form to fit text within, whether in a book or on a Web page, is the paragraph. As you might have guessed, HTML supplies a paragraph tag to format text into discrete paragraphs.
The paragraph tags,
</p>, provide the most basic block formatting for Web page text. Their use is straightforward: Place the opening tag (
<p>) at the start of the paragraph and the ending tag (
</p>) at the end of the paragraph. The user agent will format the paragraphs appropriately, usually by placing a blank line between them.
As an example, consider the following HTML code. Figure 5-1 shows the result of running this code in a browser.
<p>Welcome to The Oasis of Tranquility -- your source of day spa services at hair salon prices. Come visit us for that deep tissue or relaxing massage, facial, manicure, or hair coloring you have been putting off.</p> <p>Our concept is simple -- provide luxurious service ...