|
|
|
Block Formatting elements are the most common elements in an HTML document. We'll look at some paragraph formatting tags first.
We've already demonstrated <p> in our
Basic Template. A normal paragraph has a
single blank line after it, will ignore line breaks in the text, and
condense multiple spaces in the text into a single space. The closing
</p> tag isn't necessary, whenever the
browser runs into a new block formatting tag, it will understand that the
previous paragraph has ended.
The <BR> tag is used to force line
breaks within text. There is no closing tag. Normally, line breaks
are treated as a space by browsers (except inside the
<PRE> tag).
<P>The text will break<BR>right
here.
The text will break
right here.
<pre>....|....1....|....2....|....3....|....4 Used to include sections of text in which formatting is critical. Text will only be wrapped at the line-breaks in the source, and spaces will not be col- lapsed. Text inside this tag will be displayed in a monospaced font.</pre>
<blockquote cite="http://somewhere.com">Used when more than a few lines from a document are being quoted. Block quotations are often rendered indented.Theciteattribute is a URL to the original document.</blockquote>
The last Block Formatting element we'll learn in this chapter. A
horizontal rule (just below the text "Jump to top"),
<hr>, is typically used to separate sections within a document.
Previous Chapter | Home |
Up | Next Chapter