5 ms·
There is <header> already. What would be the difference between <h> and <header> ?
by boredpudding 10y ago
There is <header> already. What would be the difference between <h> and <header> ?
- TazeTSchnitzel 10y agoThat's for a header, not a heading. A heading is a line of text providing a title for a section. A header is a part of the top of a page.
- boredpudding 10y ago> A heading is a line of text providing a title for a section. Which is exactly what <header> is trying to be. > …introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. > When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page. Source: http://html5doctor.com/the-header-element/ http://html5doctor.com/the-header-element/ (quoted from the actual spec)
- detaro 10y agoyour source clearly shows that it is not just for the heading (but can contain it, with <hX> tags), but contains other elements as well.
- TazeTSchnitzel 10y ago> > A heading is a line of text providing a title for a section. > Which is exactly what <header> is trying to be. Not at all: > > A header typically contains a group of introductory or navigational aids. Key word here is group. A header is a block containing other elements. A heading is a line of text. Often the header contains a heading, but header element itself is not a heading. A realistic example might be something like: <header> <h1>New York Times</h1> <time>Monday, February 20, 2017</time> </header>
- tekmate 10y agoit's valid to put a <header> in any new section/main/article/aside
- TazeTSchnitzel 10y agoSo it seems, my definition wasn't the best.
- VeejayRampay 10y ago<h> is for heading elements (h1, h2, h3, etc.), <header> is for headers (more of a structural block container) I think.
- weego 10y agoheader is metadata about the page and other related resources. This is dealing with the semantic issue of, for example, web components not knowing enough about the context they are in to be able to declare the correct heading tag (h1, h2, h3... etc) as a static tag
- string 10y ago> header is metadata about the page and other related resources. I think you're confusing the head and header elements.
- walterstucco 10y agoNope. It's already been solved by HTML spec. Having an H tag it's the same of having the header tag. It doesn't solve any of the problems. see http://imgur.com/a/FnLVb http://imgur.com/a/FnLVb
- jaffathecake 10y agoThe <h> proposal is different to the <header> proposal. <header> isn't involved in outline production. The <h> proposal is more like <h1> + sectioning.
- Jaruzel 10y agoDoing it like that means: a) All headers are H1, and styled the same, unless you then start classing up the section and h1 tags accordingly = more complex css than need be. b) not-so-clever page crawlers won't be able to extract the real H1 header that should title the page content.
- deleted 10y ago[deleted]
- walterstucco 10y agoI was just showing how the DEAFAULT browser's CSS take care of nesting and different importance of H1 tags depending on the context. H1 is already the H you're looking for.