Lesson 8: paragraph tag & paragraph aligning, center tag


066

Let’s go back to our simple page.

<body>
Something really cool
</body>
Something really cool

This is the paragraph tag. Think of a paragraph as a block of text.

<body>
<p>Something really cool</p>
</body>

Something really cool

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>Something really cool</p>
<p>like an icecube</p>
</body>

Something really cool

like an icecube


So, what else is this <p> tag good for? Well, it’s great for aligning stuff.

<body>
<p align="left">Something really cool</p>
<p align="center">like an icecube</p>
<p align="right">or a popsicle</p>

<p align="left">
Something really cool<br>
like an icecube<br>
or a popsicle</p>

<p align="center">
Something really cool<br>
like an icecube<br>
or a popsicle</p>

<p align="right">
Something really cool<br>
like an icecube<br>
or a popsicle</p>
</body>

Something really cool

like an icecube

or a popsicle

Something really cool
like an icecube
or a popsicle

Something really cool
like an icecube
or a popsicle

Something really cool
like an icecube
or a popsicle


Another simple way to center stuff on your page is the <center> tag. Everything between the center tags gets centered. Can’t get simpler than that 😉

<body>
<center>Something really cool</center>
</body>
Something really cool

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s