0
I am studying Html5 and learned that the hgroup tag is no longer being used.I wanted to know which other tag can be used to replace??
0
I am studying Html5 and learned that the hgroup tag is no longer being used.I wanted to know which other tag can be used to replace??
2
Different from the answer cited as duplicate, in which it only proves that <hgroup>
was discontinued. Tag hgroup is unused?
Currently, according to the Mozilla documentation you can use the tag <header>
to group their titles: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header#Usage_notes
The
<header>
element is not sectioning content and therefore does not introduce a new Section in the Outline. That said, a<header>
element is intended to usually contain the surrounding Section’s Heading (anh1–h6
element), but this is not required.
Translation:
"The element <header>
is not a sectioning content and therefore does not introduce a new section in the schema. That being said, an element <header>
must contain the title of the surrounding section (an element h1 – h6
), but that’s not necessary."
Ex:
<header>
<h1>Meu título principal</h1>
<h2>Meu subtítulo</h2>
</header>
This way you keep the semantics of the structure and manage to group its titles
got it, thanks :)
@impossible-nothing is impossible :D! As long as you have time to research semantic tag, it will help you a lot with this kind of thing. Good luck there abs!
cool .........
1
If you just want to group the titles, then use <div>
, I don’t know any other tag that has a better semantic value for this case (since hgroup
was removed)
tag <header>
:)
OK, thanks a lot :)
Browser other questions tagged html5
You are not signed in. Login or sign up in order to post.
Possible duplicate of Tag hgroup is unused?
– Alvaro Alves
yes, it seems to take on a few browsers.
– Daniel Dias
I don’t think duplicate, a question if the tag has been removed the other question about a replacement
– Costamilam
I don’t think so. A question whether it has been discontinued and the other question by which it should be replaced, since in the old question there is no mention of it... But beware, that even the old hgroup tag running on some browsers it might crash any new browser update. In addition, it will most likely not be a valid HTML and will probably give error in the validator of W3C https://validator.w3.org/
– hugocsl