Counting With HTML5. Should H1, H2, H3, H4, H5 And H6 Be ...
The other day I was teaching how to specify headings with HTML, so I introduced the students to the h1, h2, h3, h4, h5 and h6 tags. The students quickly understood that the numbers (1 to 6) do not refer to the order of appearance nor the size of the headings. It was easy for me to show them that the numbers refer to the header importance: related to their levels in the hierarchical structure of the document.
Some days later, I introduced them to the new HTML5 tags that give semantic meaning to sections of a typical web page or application, such as sections (the section tag), articles (the article tag), headers (the header tag) and footers (the footer tag). These elements can be nested in different ways, so for example, a section may contain several articles, and an article may contain several sections.
While we were coding an example, one of my students asked me about the headings. So, the student started specifying the different headings (h1, h2 and so on). Then, the student asked me about the sections: “So now, I have to include the section1 and section2 tags, right?” “Ehhhh, no”, I had to say. “Sections are sections (with the section tag) everywhere; their tags do not include a number to refer to their level in the hierarchical structure of the document”.
Of course, that situation made me think again about a suspicion that I already had in mind:
Do we still need six different tags to specify HTML headings?
Headers and footers can be nested in a page, section, or article. A section can be composed of different articles, while articles may contain several sections and subsections… There are a lot of possible combinations that will dictate the hierarchical structure of the document, and, do we have to specify the importance or level in that hierarchical structure in the headings and only in the headings? Why not in the sections themselves? Or in any other element?
Or are these numbers really needed? Could they be inferred from the structure of a coherent and well-formed HTML document? I mean, at least, it is sure that we can give headings different formats (with CSS) depending on where they are placed: inside of a header of an article, inside of a header of a section, inside of a section of a section, etc…
So, what do you think?
—
Author: Eduardo Rivera
- International Universities in Spain
- Study in Spain in English
- Study Abroad in Spain
Từ khóa » H1 Vs H4 Html
-
HTML H1 To H6 Tag - W3Schools
-
–
: The HTML Section Heading Elements - MDN - Mozilla
-
H1, H2, H3, H4, H5, H6 HTML - W3schools.blog
-
Header Tags: A Simple (But Complete) Guide To H1, H2 And H3 Tags
-
HTML:
Tag - TechOnTheNet
-
HTML: The H1 To H6 Tags - Khan Academy
-
HTML Heading Tags: The SEO Guide For H1 - H6 - SE Ranking
-
HTML - Heading Elements H1, H2, H3, H4, H5 And H6.
-
H1 Vs. H2 Heading Tags: Here's The Difference
-
What Are H1, H2, H3, H4, H5, And H6 Tags And How Do They Affect ...
-
XHTML >> Tags >> H1, H2, H3, H4, H5, H6 | DevGuru
-
Heading Tags, What Are They And How To Use? | By Thiago Vaz
-
What Is The H1 Tag And Why It Is Important For SEO - Reliablesoft
-
H1 Vs H2 Vs H3: What Are Heading Tags And How To Use Them?