<h1> creates the level 1 header. <h2> creates the level 2 header, etc.
<h1> - <h6> |
Yes | Yes | Yes | Yes | Yes |
The "align" attribute is deprecated in HTML5. Use CSS to instead.
The <h1>-<h6> tag supports the Global Attributes in HTML.
The <h1>-<h6> tag supports the Event Attributes in HTML.
h1 { display: block; font-size: 2em; margin-before: 0.67em; margin-after: 0.67em; margin-start: 0; margin-end: 0; font-weight: bold; }
A demo showing how to use <h1> <h2> <h3> <h4> <h5> <h6>.
<html>
<body>
<h1>This is a #1 heading</h1>
<h2>This is a #2 heading</h2>
<h3>This is a #3 heading</h3>
<h4>This is a #4 heading</h4>
<h5>This is a #5 heading</h5>
<h6>This is a #6 heading</h6>
</body><!--from w w w . j a va 2 s . c o m-->
</html>