HTML Headings | HTML H1 Tag, H2 Tag - Tech Altum Tutorial
- HTML Tutorial
- HTML Tags
- HTML Attributes
- HTML Text
- HTML Headings
- Block & Inline Elements
- HTML Lists
- Hyperlink
- HTML Images
- HTML Iframes
- HTML Entities
- HTML Meta Tag
- HTML Tables
- HTML Form
- HTML5
- HTML5 New Tags
- HTML5 Attributes
- HTML5 Vs HTML4
- HTML5 Audio and Video
- HTML5 Form.
- HTML5 SVG.
- HTML5 Canvas.
- HTML5 Geolocation.
- Local & Session Storage
- HTML Marquee
- Doctypes in HTML
- XHTML
- DHTML
- ← HTML Text
- Block & Inline Elements →
- Home
- Frontend
- Html
- Html Headings
Heading Elements h1 - h6
HTML includes Six headings elements. These headings are <h1>, <h2>, <h3>, <h4>, <h5> and <h6>.
Heading elements are used to write headings in a webpage, whereas p tag is only for plain text. All Headings are bold and block level elements.
Font size of all heading gradually decreases. For example h1 is twice of p, h2 is 1.5% of p tag, h3 is 1.17% of p tag and h4 and p tags are of same font size. h5 and h6 are smaller than p tag.
- HTML Headings
- H1 Tag
- H2 Tag
- How to use heading in html
HTML Headings Example
- Heading 1 ( <h1>)
- Heading 2 ( <h2>)
- Heading 3 ( <h3>)
- Heading 4 ( <h4>)
- Heading 5 ( <h5>)
- Heading 6 ( <h6>)
Headings Code
Html headings example.
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
<h1> Heading 1 </h1> <h2> Heading 2 </h2> <h3> Heading 3 </h3> <h4> Heading 4 </h4> <h5> Heading 5 </h5> <h6> Heading 6 </h6>HTML h1 tag <h1>
H1 tag or <h1> is the main heading or level one heading of a webpage. Search engines like Google, yahoo, bing etc gives maximum priority to the h1 element. As per search engine parameters, h1 tag should be used only once in a webpage. Default font size of h1 element is 2em and its bold.
Heading 1
<h1> Heading 1 </h1>Rules for h1 Tag
- Use proper headings. Do not use heading to increase font size.
- Always starts with h1 followed by h2 and next.
- Do not repeat h1 in same page.
HTML h2 tag <h2>
H2 tag or <h2> is the sub heading of h1 element. It is recommended to use headings in proper sequence for better search results and to avoid confusion.
Heading 2
<h2> Heading 2 </h2>Correct Way to use h2
h2 is always used after h1. Number of h2 in a webpage can can vary.
Heading 1
Heading 2
<h1> Heading 1 </h1> <h2> Heading 2 </h2>HTML Headings Example
In the example below, we are building a webpage with title and h1 Frontend. In the body, we will start with h1 tag first, and then other headings.
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Frontend</title> </head> <body> <h1>Frontend</h1> <p>Description for Frontend Web Development</p> <h2>HTML</h2> <p>Description for HTML</p> <h3>HTML 4</h3> <p>Description for HTML4</p> <h3>HTML 5</h3> <p>Description for HTML5</p> <h2>CSS</h2> <p>Description for CSS</p> <h3>CSS 2</h3> <p>Description for css2</p> <h3>CSS 3</h3> <p>Description for css3</p> <h2>Javascript</h2> <p>Description for JavaScript</p> <h3>Javascript</h3> <p>Description for Javascript</p> <h3>JS ES6</h3> <p>Description for JS ES6 and above</p> </body> </html>As per Search Engine Rules, it is compulsory to define at least one h1 and h2 in a webpage.
- ← HTML Text
- Block & Inline Elements →
Từ khóa » H1 Vs H2 Html
-
HTML H1 To H6 Tag - W3Schools
-
H1 Vs. H2 Heading Tags: Here's The Difference
-
Header Tags: A Simple (But Complete) Guide To H1, H2 And H3 Tags
-
How To Use H1, H2, And H3 Header Tags For SEO Effectively
-
–
: The HTML Section Heading Elements - MDN - Mozilla
-
What Is The Difference Between H1, H2 Tag And Alt Tag In SEO?
-
H1 Vs H2 Vs H3: What Are Heading Tags And How To Use Them?
-
HTML Heading Tags: The SEO Guide For H1 - H6 - SE Ranking
-
Heading Tags (H1, H2, H3, P) In HTML - Accessibility At Penn State
-
Why Use H1, H2, H3 Tags For Your SEO? - Semji
-
Using H1, H2, H3 Heading Tags For SEO And UX • LockedownSEO
-
What Is The H1 Tag And Why It Is Important For SEO - Reliablesoft
-
H1-H6 Heading Tags And SEO: The Ultimate Guide - ContentKing