HTML Paragraph
This tag <p> </p> is used to define a paragraph of text. You can use the align attribute with a paragraph tag.
For Example
<p> My First Paragraph </p>
many attributes using in Paragraph.
Attribute of <p> </p> tag
Tags of heading | Attributes Names |
<p> </p> |
align | class | dir | id | lang | style | title |
Values of attributes using the paragraph
Attributes Names |
Attributes Values |
align |
center | justify | left | right |
class |
class name |
dir |
ltr | rtl |
id |
unique alphanumeric identifier |
lang |
language code |
style |
style information |
title |
advisory text |
Example
HTML Code |
<html>
<body>
<p> My First Paragraph </p>
<p align="justify">My First Paragraph aligned to the justify</p>
<p align="center">My First Paragraph aligned to the center</p>
<p align="right">My First Paragraph aligned to the right</p>
<p align="left">My First Paragraph aligned to the left</p>
<p style="font-size: 20pt;">My First Paragraph with style information</p>
<p style="background: #eeeeee;">My First Paragraph with style information</p>
<p style="font-family: Verdana, Arial">My First Paragraph with style information</p>
<p style="font-weight: bold;">My First Paragraph with style information</p>
<p style="padding: 20px;background: #eeeeee;">My First Paragraph with style information</p>
<p style="color: #f0f000;">My First Paragraph with style information</p>
<p dir="rtl">My First Paragraph with dir value rtl</p>
<p dir="ltr">My First Paragraph with dir value ltr</p>
<p title="http://itcollegeall.blogspot.com">My First Paragraph with title </p>
</body>
</html> |
|
Result |
|
No comments:
Post a Comment