Using Headings, Paragraphs, and Line Breaks
Large Heading!
<h2>Heading 2</h2>Heading 2
<h3>Heading 3</h3>Heading 3
<h4>Getting Small</h4>Getting Small
<h5>Smaller Still...</h5>Smaller Still...
<h6>You must have good vision...</h6>You must have good vision...
Okay, I think you get the idea here. Now let's move on to a line break. The tag for a line break is <br />. When you insert this tag in your document, the contents will go to the next line. The <br /> tag does not need a closing tag afterward. Here is an example:
End this line now!!<br />Thanks!
This will generate the following:
End this line now!!
Thanks!
Basically, a line break is like hitting the
"enter" key when you are writing text. The browser will not go to
the next line until it runs out of space, or sees a tag that will force
it to the next line. So typing the following in your text editor
will display only one line of text in the browser:
Thanks!
Hello,
I want
a new line.
This gives us:
I want
a new line.
Hello, I want a new line.
To make the text move to the next line, use your <br /> tag from above:
Hello,<br />
I want<br />
a new line.
Now this will do what we wanted it to do:
Hello,
I want
a new line.
Now, let's move on to the paragraph
tag, <p>. This tag will skip a vertical space after going to the
next line, as though you had typed <br /> twice. This tag is good
for skipping a line quickly and for knowing where you wanted a new paragraph
to begin. How about an example? Well, O.K.:
I want
a new line.
This is some cool stuff.
<br />
This is the next line.
<p>
This is a new paragraph. Is this cool or what?
</p>
This will give us the following:
<br />
This is the next line.
<p>
This is a new paragraph. Is this cool or what?
</p>
This is some cool stuff.
This is the next line. This is a new paragraph. Is this cool or what?
This is the next line. This is a new paragraph. Is this cool or what?
0 comments:
Post a Comment