Getting Wordy
Words are the foremost method of communication on the World Wide Web, and it’s a rare Web page indeed that hasn’t got a passel of ’em scattered all over it.
In the examples that are provided in the following sections, I show the basic code necessary for creating the particular elements that I talk about.
Paragraphs
Paragraph elements are what you normally use to place text on a Web page. You put the text between the <P> and </P> tags, as in the following example:
<P>This is where the textual content goes.</P>
Technically, the end tag for a P element is optional in HTML. You don’t need to include it, although most Web-page creation programs add it automatically.
Web browsers automatically add a bit of space between paragraphs. If you want some extra space, you can add it by using the line break, or BR, element, as the following example shows:
<P>This is the first paragraph.</P> <BR> <P>This paragraph has a space above it.</P>
Figure 3-4 shows the results of using the BR element.
Figure 3-4. Paragraphs with line breaks add more white space to your Web page.
You can usually get away with using an empty P element — one with no content between the start and end tags — to create a blank line between paragraphs instead of using a BR element. Unfortunately, this technique doesn’t work for all Web browsers. Because empty P elements aren’t allowed ...
Get Building a Web Site For Dummies®, 3rd Edition 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.