5 ms·
Simply use <strong> or <em> to let the browser know that your heading is important.
by Raphmedia 10y ago
Simply use <strong> or <em> to let the browser know that your heading is important.
- Ajedi32 10y agoI'm not sure if this is supposed to be a joke, or...?
- Raphmedia 10y agoNot a joke at all. It should look like: <header> <h1>My page title</h1> <strong>My page is the best page on this website.</strong> <header> If your heading is a paragraph you should use a <p> instead. That's what we have been doing for ages. I don't see the need for a new tag. HTML5 already add semantic tags. Before, it would have been the same as this snipped I posted but without the <header> tag. Now that this tag exists there is no confusion at all. Web crawlers should be smart enough to know that the <strong> that that is in a header right next to a title is a heading. Hell, even <hgroup> has been deprecated because we don't need those tags.
- Ajedi32 10y agoBut what does that have to do with the original article? The problem it's discussing is the lack of a context-dependent outline algorithm for h1-6 elements in modern browsers.
- Raphmedia 10y agoIt already does that. If you do : <body> <h1>My website</h1> <section> <h1>My section</h1> </section </body> The second <h1> will act as a <h2>. Edit: I think I'm missing the point here. Ignore those posts.