Definition and Usage
The <h1> to <h6> tags are used to define HTML headings. The <h1> tag defines the most important heading, while the <h6> tag defines the least important heading.
Example
```html
This is heading 1
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is heading 6
```
Browser Support
The <h1> to <h6> tags have the following browser support:
| Browser |
| | | | | |
| --- | --- | --- | --- | --- | --- | --- |
| Chrome | Yes | Yes | Yes | Yes | Yes | Yes |
| Firefox | Yes | Yes | Yes | Yes | Yes | Yes |
| Safari | Yes | Yes | Yes | Yes | Yes | Yes |
| Edge | Yes | Yes | Yes | Yes | Yes | Yes |
Global Attributes
The <h1> to <h6> tags also support the Global Attributes in HTML, which include:
align
bgcolor
border
cellpadding
cellspacing
frame
noembed
Example
```html
This is heading 1
```
Event Attributes
The <h1> to <h6> tags also support the Event Attributes in HTML, which include:
onclick
ondblclick
onmousedown
onmouseup
Example
```html
This is heading 2
```
Related Pages
For more information on HTML headings, see the following pages:
Try it Yourself!
Try out the examples above and experiment with different values for the align, bgcolor, frame, etc. attributes to see how they affect the appearance of your headings.
Related Examples
Related References
Sources:- [
HTML h1 to h6 tag - W3Schools] (
https://www.w3schools.com/tags/tag_hn.asp)
- [
What is an H1 Tag? Examples & SEO Best Practices - Moz] (
https://moz.com/learn/seo/h1-tags)
- [
–: The HTML Section Heading elements - MDN
] (
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements)
- [
What is an H1 Tag? SEO Best Practices - Ahrefs] (
https://ahrefs.com/blog/h1-tag/)
- [
USCIS] (
https://www.uscis.gov/newsroom/alerts/h-1b-faq)
- [
H1 Tag Best Practices: Definition, Strategy, and Examples] (
https://backlinko.com/h1-tag)
- [
What Is an H1 Tag? Why It Matters & Best Practices for SEO] (
https://www.semrush.com/blog/h1-tag/?msockid=2e31147c47936783107302f8463566f6)
- [
What is an H1 Tag: A Beginner's Guide With Best Practices] (
https://bloggerspassion.com/h1-tag/)
- [
What Is An H1 Heading? And Why They Still Matter In 2025] (
https://www.laurajawadmarketing.com/blog/what-is-an-h1-heading/)
- [
Header Tags: A Simple (But Complete) Guide To H1, H2 and H3 …] (
https://seosherpa.com/header-tags/)