What is an attribute ?
Attributes are used to modify and provide more information about an element or a tag . They are added to the starting tag of HTML . They appear in name="value" pairs .
You can align the text to left, center, right its up to you .
Try this example :
<p align="center"> This is an example . Here the text is aligned to center </p>
Output :
The content will be place to the center . Like this
This is an example . Here the text is aligned to center
How to change the size etc ?
See the difference of 100px and 100% and what does it do .
Try this example :
<hr width="100px"/>
<hr width="100%"/>
Outputs :
Okay lets try them all together .
Should try this yourself :
<p align="center"> This is an example </p> <hr width="100px"/> <hr width="100%"/>
Output :
This is an example
See the text is aligned at the center and the lines are adjusted with the measure . I think you understand this and in our next lesson we will learn about images , links etc .
Post A Comment:
0 comments: