Welcome to WebmasterWorld Guest from 54.159.19.75

Forum Moderators: incrediBILL

Message Too Old, No Replies

hgroup removed from the HTML5 specification

     
4:30 pm on Apr 12, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Oct 17, 2005
posts: 4966
votes: 10



For now browsers wonít remove support for hgroup but itís likely that they will do so in the future.

[iandevlin.com...]
2:01 pm on June 11, 2013 (gmt 0)

Administrator

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 31, 2003
posts:12533
votes: 0


I don't think that its removal is a bad thing as it didn't really appear to have much use.


Personally, I couldn't agree more.
7:09 pm on June 14, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


So here we have a fluid HTML spec always called HTML 5.

My mind is boggled.
5:34 pm on June 20, 2013 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8139
votes: 103


A useless element, but I wonder if a browser "removes" support and I have CSS that depends on hgroup, what happens?

Will this be like I have to do with IE8 and run some javascript to make it aware of elements? I presume I would (and could) if I needed this compatibility.
5:41 pm on June 20, 2013 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8139
votes: 103


PS

Its only stated reason for being in HTML is to support a non essential case in an algorithm that is not implemented in any browser
src: [lists.w3.org...]


So since as of March 2013 it was not implemented in any browser, what harm in removing from the spec in April 2013? Because of the millions of webpages that implemented hgroup in anticipation of browser support?

I think this actually illustrates the utility of the Living Standard [webmasterworld.com] approach rather than the pitfall. Rather than waiting for three years while the W3C nabbles about behind closed doors to issue the next version of the spec, while in the meantime browser manufacturers are implementing a useless tag, the spec can see the situation in the real world and adapt based on what actually makes sense.
6:45 pm on June 20, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 29, 2002
posts:980
votes: 0


It's only removed from the W3C HTML5 spec, and that's because most people have given up on participating in the HTMLWG because it's completely dysfunctional.

<hgroup> is still in the HTML Living Standard maintained by WHATWG, it's used on over 100,000,000 pages including sites like Apple, Adobe, Economist, Wordpress etc. It will continue working :)
7:35 pm on June 20, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


... and it is implemented and supported in all major browsers:
[w3schools.com...]

But I agree it isn't needed. It adds no value that cannot be achieved with a div or similar. The h2 is already, by definition, a subheader of the nearest prior h1.
8:00 pm on June 20, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 29, 2002
posts:980
votes: 0


It just provides more a specific hook for marking up this pattern:

<h1>Heading</h1>
<h2>Subheading</h2>

<p>

<h2>Heading level 2</h2>

<p>

It's useful for styling (e.g. margin:0 between the h1 and h2 when used as a heading with subheading) and for generating a document outline.
8:24 pm on June 20, 2013 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8139
votes: 103


>> it is implemented and supported in all major browsers
>> 100,000,000 pages

Sorry - I didn't check up on that comment!

>>useful for styline
more useful than

h1 + h2 {}
8:48 pm on June 20, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Let's also not confuse things ...

<h1>Heading</h1>
<h2>Subheading</h2>
<p></p>
<h2>Subheading</h2> <-- also "subheading", not simply "some other header"
<p></p>


If you want a tagline or similar to your header, and are using h2 because it's visually different, then you are using it wrong. h1 and h2 are semantically different.

I feel that we are getting into the same ol' "div vs table" argument here, where people use elements to provide a visual difference, rather than considering what's proper.

Too many times have I seen:
<h1>Name</h1>
<h2>Tagline</h2>

... when people actually meant:
<h1>Name <span>Tagline</span></h1>
9:49 pm on June 20, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month

joined:Apr 9, 2011
posts:12720
votes: 244


Every time I see <hgroup> I initially take it to mean <h\d> short for
h1, h2, h3, h4, h5, h6
and am then disappointed to (re)learn it isn't anything of the sort :(

:: trying not to think about all the e-books I made in past years using numbered headings for style on the title page ::
10:37 pm on June 20, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 29, 2002
posts:980
votes: 0


If you want a tagline or similar to your header, and are using h2 because it's visually different, then you are using it wrong. h1 and h2 are semantically different.

Note the W3C currently use this pattern on all their specs :)

eg: [w3.org...]
10:46 pm on June 20, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 29, 2002
posts:980
votes: 0


more useful than h1 + h2 {}

Yes, because you can then style the h1 when it's grouped with an h2, style as a single block, etc.
2:46 am on June 21, 2013 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8139
votes: 103


>>then style the h1 when it's grouped with an h2

Ah yes... in absence of a :parent pseudo selector
4:31 pm on June 21, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


I will agree that you can target the h1, but that can already be achieved via classes (or a div wrapper or similar), so the hgroup still does not really contribute anything new.

As for W3C using that pattern -- they certainly didn't on the page you linked. They used the h1 as the main header, and all h2's as section headers.
5:30 pm on June 22, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 23, 2005
posts:742
votes: 0


I use hgroup on a page on one of my customer's sites and it worked very well for the page outline. I wish I could recall the details but I found it handy at the time.