|
Learn
HTML - Lesson - 7
Let's go back to our simple page.
<body>
My web page is kool
!
</body>
<p>s is the paragraph tag.
<body>
<p>My
web page is kool !</p>
</body>
By itself it doesn't "do" much
except act as a sort of a container. And
with most browsers, starting a new paragraph
has the effect of skipping a line.
<body>
<p>My web page
is kool</p>
<p>and beautiful
!</p>
</body>
So, what else is this <p> tag good
for? Well, it's great for aligning stuff.
<body>
<p align="left">My
web page is kool</p>
<p align="center">and
beautiful</p>
<p align="right">like
Alps</p>
</body>
And one more thing before we move on. Earlier
we were talking about centering things.
There's another way to center something
that should definitely be in your bag of
tricks.
First though, I want to introduce the <div>
tag...
<body>
<div>My
web page is kool !</div>
</body>
What does the <div> tag do? Absolutely
nothing... except set that block of text
(or images or whatever) apart from the rest
of the text so that you can do something
special with it... such as center it. A
simple line break is placed before and after
the contents of a <div>.
<body>
<div align="center">My
web page is kool</div>
</body>
|