Learn HTML : Paragraphs

Last Updated on Wednesday, 15 April 2009 06:31 Written by Admin Wednesday, 15 April 2009 06:31

As we all know when we write , we dont have one big lot of words we break our words up into sections or paragraphs. This article is about the Paragraph tag and how we can use it in our web pages to format our words.Paragraphs are used to format our text into sections. An HTML paragraph is created by using the

..

tags. When viewed in the browser you will see that HTML has automatically added an extra blank line before and after the tags. 

<head>
<title>Paragraphs</title>
</head>
<body>
This is some text that is not in a paragraph tag.
<p><b>this is some text that is in a paragraph tag.</b></p>
This is some text that is not in a paragraph tag.
</body>
</html>

will result in

Paragraphs

Paragraphs

 

Like othe tags it is possible to add additional atributes to the tag. One of these attributes is the Align attribute,

Align

The align attribute accepts three values
Left:

For left aligned text

Center :

For center aligned text

Right :

For right aligned text

So the following

<head>
<title>Paragraphs</title>
</head>
<body>This is some text that is not in a paragraph tag.
<p align="right"><b>this is some text that is in a paragraph tag.</b></p>
<p align="center"><b>this is some text that is in a paragraph tag.</b></p>
<p align="left"><b>this is some text that is in a paragraph tag.</b></p>
This is some text that is not in a paragraph tag.
</body>
</html>

Will Produce

Paragraphs with

Paragraphs with aligns

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply