Breaking Up Text
There are many ways to break up text in HTML, three of which are to use line breaks, horizontal rules, or blockquotes.
Line Breaks
Try It: Use the
The
will appear as:
In the last lesson you learned that when browsers display a <br />
tag. Try one by itself and several in a row.The
<br />
tag
This is a nifty line<br />break<br /><br />
That was two in a row!
This is a nifty line
break
That was two in a row!
break
That was two in a row!
<p>
tag,
they usually display a blank line before and after the paragraph. However, there are
times you may want to add a blank line yourself within a paragraph or not inside a
paragraph at all, or even many blank lines in a row. You can do this with the
<br />
tag.
The <br />
tag is a stand-alone
tag - it does not open and close like the other tags you have learned so far. Putting
just one <br />
causes a line break - the text after the
<br />
starts on the next line. Putting two <br />
tags in a row makes a blank line. You can put as many <br />
tags
as you want to get many blank lines.
Horizontal Rule
Try It: Add a
Another way to break up text on your page is to add a horizontal
rule with the <hr />
to your code
Hey look:
That was a horizontal rule!
That was a horizontal rule!
<hr />
tag, another stand-alone tag. A
horizontal rule is simply a line going all the way across the page. Horizontal rules
look slightly different on different browsers.
Blockquote
Try It: Use the
The <blockquote>
tag.
<blockquote>
tag allows you to show off long quotations.
Most browsers display <blockquote>
by adding a blank line before
and after the quote, indenting both the left and right margins, and sometimes using
italics. The quote below is displayed using blockquote:
"Not only have women been successful in entering fields in which men are supposed to have a more natural aptitude, but they have created entirely new businesses." Lucretia P. Hunter, 1932
Although it is not good style, you can use blockquote as a quick and dirty way to get any paragraph to indent, not just a quotation.
End of Topic