HGROUP element removed from the HTML5 Specification. What alternative technique can be used instead?

后端 未结 4 1488
难免孤独
难免孤独 2021-02-14 05:51

As some of you would of heard the hgroup element is being removed from the HTML5 Specification. (For more info, see the W3C HTML Working Group\'s decision on reques

4条回答
  •  时光取名叫无心
    2021-02-14 06:28

    A couple of points to consider:

    1. Even if the tag is removed from the HTML5 specification, it doesn't mean that it would stop working overnight. Browsers keep backwards compatibility for a long time (AFAIK most if not all browsers still render correctly!)

    2. Even if the browsers would drop support overnight, they'd still render the page correctly because I don't think the hgroup tag adds any inherent styling and (modern) browsers are very lenient in allowing tags they don't recognize.

    3. I might be reading the question wrong, but between the lines it sounds like you've been misusing the hgroup tag anyway. (It's not allowed to contain anything other than header elements.)

    I don't see any problem in either dropping the tags completely or replacing them with divs.

提交回复
热议问题