HTML | <p> align Attribute
The HTML <p> align Attribute is used to specify the alignment of paragraph text content.
Syntax:
<p align="left | right | center | justify">
Attribute Values:
- left: It sets the text left-align.
- right: It sets the text right-align.
- center: It sets the text center-align.
- justify: It stretch the text of paragraph to set the width of all lines equal.
Note: The <p> align attribute is not supported by HTML 5.
Example:
<!DOCTYPE html> <html> <head> <title> HTML p align Attribute </title> </head> <body> <h1>GeeksforGeeks</h1> <h2>HTML p align Attribute</h2> <p align="left"> Left align content </p> <p align="center"> center align content </p> <p align="right"> Right align content </p> </body> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by HTML <p> align attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
- HTML | <col> align Attribute
- HTML | <img> align Attribute
- HTML | <td> align Attribute
- HTML | <hr> align Attribute
- HTML | <th> align Attribute
- HTML | <div> align Attribute
- HTML | <tr> align Attribute
- HTML | <caption> align Attribute
- HTML | <input> align Attribute
- HTML | <object> align Attribute
- HTML | <legend> align Attribute
- HTML | <tfoot> align Attribute
- HTML | <colgroup> align Attribute
- HTML | <tbody> align Attribute
- HTML <table> align Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



