Tag hgroup is unusable?

Asked

Viewed 3,404 times

7

I was watching some video-lessons on HTML5 and came across the tag hgroup which serves to group h1,h2..., reading that this morning I saw that she was removed from HTML5. Does that check? it is no longer necessary to study her?

2 answers

18


  • Thank you very much. off-topic Peraí, you are the real Maujor?

  • 2

    Yes I am the real one Maujor live and in color! .

  • 1

    I ask this, because I learned pretty much everything about CSS on your site! o

  • 2

    Caraca, answered by the maujor himself!!

  • I deserved a medal, didn’t I? ahahhaha :D

  • 6

    Maujor, if you have not been notified in the other answer (deleted), I will repeat here. I have been reading your site for many years, and it is a pleasure to see you here at Stack Overflow in English! Welcome, your collaborations will surely add valuable content!

  • 2

    Thank you all for the welcome.

  • anything, any doubt about css can ask me hahahaha

  • Wouldn’t it be interesting to transcribe and translate the motivations that led to the label being removed here for the answer ? It would help those who went through this answer to become more enlightened as to why it no longer exists.

  • The element (not a label but an element of the HTML markup) has been removed as it is in practice of zero semantic value. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup

Show 5 more comments

2

As friend @Maujor commented, the tag <hgroup> is obsolete https://caniuse.com/#search=hgroup


But as a complement I would like to leave a more semantic and updated solution using the tag <header>.

According to the W3C:

To header element is intended to usually contain the Section’s Heading (an h1–h6 element), but this is not required. The header element can also be used to wrap a Section’s table of Contents, a search form, or any Relevant logos.

Translating:

"An element header should usually contain the section header (an element h1 – h6), but this is not necessary. The element header can also be used to group the index of a section, a search form or any relevant logo."

Source: https://www.w3.org/TR/html50/sections.html#the-header-element

Basic example:

<header>
 <h1>Welcome to...</h1>
 <h2>StackOverflow!</h2>
</header>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.