Attributes part 3

HTML Fundamentals
HTML Basics
Attributes
54
3/4
               

The Align Attribute



The align attribute is used to specify how the text is aligned.

In the example below, we have a paragraph that is aligned to the center, and a line that is aligned to the right.
<html>
<head>
<title>Attributes</title>
</head>
<body>
<p align="center">This is a text <br />
<hr width="10%" align="right" /> This is also a text.
</p>
</body>
</html>
Try It Yourself

The align attribute of <p> is not supported in HTML5.

Comments