HTML | <h1> to <h6> align Attribute
The HTML <h1> to <h6> align Attribute is used to specify the alignment of the <h> element or the content present inside the Heading Element.
Syntax:
<h1 align="left | right | center | justify">
Attribute Values:
- left: It sets the content to the left-align.
- right: It sets the content to the right-align.
- center: I sets the div element to the center.
- justify: It sets the content to the justify position.
Examples:
<!DOCTYPE html><html> <body> <h1 align="center">center</h1> <h2 align="left">left 2</h2> <h3 align="right">right 3</h3> <h4 align="justify">justify</h4> </body> </html> |
Output :
Supported Browsers: The browsers supported by HTML h1 align Attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Apple Safari
- Opera
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.


