Why is the <hgroup> tag added in HTML5?

Why is the tag <hgroup>added in HTML5? What is their technical use? What is the advantage of grouping?

+3
source share
4 answers

Here is a good article on HTML5 Doctor:

Hgroup element

+5
source

Immersion in HTML5 also has a pretty good example<hgroup> .

+1
source

, :

h1 {font-size:5em}                   output: font-size 5em
h2 {font-size:2em; color: black}     outout: font-size 2em, black

hgroup,

hgroup h1 {font-size:3em}            output: font-size:3em
hgroup h2 {color:grey}               output: font-size:2em (from above defined), grey 
+1

"" . , H1 H2 , , .

Traditionally, it would be problematic at best to try and guess which heading levels to allow in the editor markup.

I did not study the hgroup element in detail, but I read the article above and others, and it seems logical that the hgroup element can be used to "reset" level numbering, so that dynamic content in a rich editor can start using H1.

0
source

Source: https://habr.com/ru/post/1754077/


All Articles