HTML
HTML Headings
¶HTML Headings
In HTML, a heading tag is used to create a heading or a subheading for a section of content on a web page. The heading tag is denoted by the “h” letter followed by a number, where the number represents the level of importance or hierarchy of the heading.
The following are the six levels of heading tags in HTML:
-
<h1>
- the most important heading tag, typically used for the title of the page -
<h2>
- used for main headings on the page -
<h3>
- used for subheadings -
<h4>
- used for sub-subheadings -
<h5>
- used for minor headings -
<h6>
- used for the least important headings
¶Example
<h1>Heading no. 1</h1>
<h2>Heading no. 2</h2>
<h3>Heading no. 3</h3>
<h4>Heading no. 4</h4>
<h5>Heading no. 5</h5>
<h6>Heading no. 6</h6>
¶live preview
Heading no. 1
Heading no. 2
Heading no. 3
Heading no. 4
Heading no. 5
Heading no. 6
Here’s an example of how the <h1>
and <h2>
tags might be used:
<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>Welcome to My Web Page</h1>
<p>This is my first paragraph.</p>
<h2>About Me</h2>
<p>This is some information about me.</p>
<h2>My Hobbies</h2>
<p>These are my favorite hobbies.</p>
</body>
</html>
¶Output:
In this example, the <h1>
tag is used for the main title of the page, while the <h2>
tag is used for the subheadings “About Me” and “My Hobbies”.
It is important to use heading tags properly in HTML for both accessibility and SEO (search engine optimization) purposes. Proper use of heading tags can help users understand the structure and hierarchy of the content on a web page and can also help search engines understand the main topics and themes of a page.
All Tutorials in this playlist
Popular Tutorials
Categories
-
Artificial Intelligence (AI)
11
-
Bash Scripting
1
-
Bootstrap CSS
0
-
C Programming
14
-
C#
0
-
ChatGPT
1
-
Code Editor
2
-
Computer Engineering
3
-
CSS
28
-
Data Structure and Algorithm
18
-
Design Pattern in PHP
2
-
Design Patterns - Clean Code
1
-
E-Book
1
-
Git Commands
1
-
HTML
19
-
Interview Prepration
2
-
Java Programming
0
-
JavaScript
12
-
Laravel PHP Framework
37
-
Mysql
1
-
Node JS
1
-
Online Business
0
-
PHP
28
-
Programming
8
-
Python
12
-
React Js
19
-
React Native
1
-
Redux
2
-
Rust Programming
15
-
SEO - Search Engine Optimization
1
-
Tailwind CSS
1
-
Typescript
10
-
Uncategorized
0
-
Vue JS
1
-
Windows Operating system
1
-
Woocommerce
1
-
WordPress Development
2
Tags
- Artificial Intelligence (AI)
- Bash Scripting
- Business
- C
- C Programming
- C-sharp programming
- C++
- Code Editor
- Computer Engineering
- CSS
- Data Structure and Algorithm
- Database
- Design pattern
- Express JS
- git
- Git Commands
- github
- HTML
- Java
- JavaScript
- Laravel
- Mathematics
- MongoDB
- Mysql
- Node JS
- PHP
- Programming
- Python
- React Js
- Redux
- Rust Programming Language
- SEO
- TypeScript
- Vue JS
- Windows terminal
- Woocommerce
- WordPress
- WordPress Plugin Development