Skip to main content

HEADING TAG IN HTML



HEADING TAG





HTML headings are used to create a hierarchical structure for the content on a webpage. They range from level 1 (the most important) to level 6 (the least important).

The most commonly used heading tags are H1, H2, and H3. The H1 heading is typically used for the main title of the webpage, while H2 and H3 headings are used for subheadings and sub-subheadings, respectively.

To create a heading in HTML, you can use the following syntax:


<h1>This is a level 1 heading</h1>

<h2>This is a level 2 heading</h2>

<h3>This is a level 3 heading</h3>

<h4>This is a level 4 heading</h4>

<h5>This is a level 5 heading</h5>

<h6>This is a level 6heading</h6>



source code for heading tag:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,
    initial-scale=1.0">
    <title>HEADING TAG</title>
</head>

<body>
    <h1>This is a level 1 heading</h1>

    <h2>This is a level 2 heading</h2>

    <h3>This is a level 3 heading</h3>

    <h4>This is a level 4 heading</h4>

    <h5>This is a level 5 heading</h5>

    <h6>This is a level 6heading</h6>
</body>

</html>

It's important to note that search engines give more weight to headings when determining the relevance of a webpage for a particular search query. So, it's a good practice to use headings to organize your content and make it more discoverable.

Additionally, headings can also be styled with CSS to change the font size, color, and other properties. This allows you to make your headings stand out and improve the overall design of your webpage.

In summary, HTML headings are an important tool for structuring the content on your webpage and making it more discoverable. They also provide a way to improve the design of your webpage by allowing you to style them with CSS.

Output of the heading tag example:



Comments

Popular posts from this blog

Basic HTML Web Page Structure

  Basic HTML Web Page Structure in Hindi.   लेखक   RAVINDRA CHAUBEY HTML Document के Basic Structure की पूरी जानकारी. HTML Document या एक HTML Page का निर्माण HTML Elements और   HTML Tags   से होता है. HTML Page को आप   Webpage   के नाम से भी जानते है. एक अखबार ( Newspaper) या पत्रिका लेख ( Magazine Article) की बनावट के अनुरूप ही एक HTML Page का Structure होता है. एक सामान्य पत्रिका लेख में Headings ( शीर्षक) , Paragraphs, Sub-headings ( उपशीर्षक) आदि होते है. ठीक यही चीजे एक Basic HTML Document में भी होती है.  एक HTML Document में भी शीर्षक , Paragraphs तो होते ही है. इनके अलावा भी कई और चीजे एक HTML Page में होती है. जिनके बारे में नीचे बताया जा रहा है. Table of Content HTML Page Structure  The Doctype Element

Create First Webpage with Html

  HTML से First Webpage बनाने का तरीका Step: 1 एक Text Editor Open कीजिए अपना First HTML Webpage बनाने के लिए सबसे पहले तो एक Simple Text Editor को Open कीजिए. इसके लिए आप Notepad का उपयोग कर सकते है. Notepad शुरुआत करने के लिए सबसे अच्छा टूल है. Step: 2 HTML Code लिखिए Notepad को Open करने के बाद आपको इसमें कुछ HTML लिखनी है. आप नीचे लिखे HTML Program को अपने नोटपैड में Copy कर सकते है. या फिर इस HTML Program को  Keyboard  की मदद से लिख सकते है. इस Example में हमने एक HTML Document के सामान्य Structure में काम आने वाले Tags को Use किया है. आप एक HTML Document Skeleton के बारे में अधिक जानकारी के लिए हमारे इस Lesson को पढ सकते है. इस Lesson का URL नीचे दिया गया है. इसे पढे:   HTML Document Structure <!DOCTYPE html> <html> <body><h1>My First Heading</h1><p>My first paragraph.</p> </body> </html> Example को समझिए <!DOCTYPE html>  HTML Tag Document को Define करता है. <html>  Tag एक ...