rikki-iki / rikki-iki.github.io

http://ikalator.com
0 stars 0 forks source link

Basic HTML5 structure #1

Closed rikki-iki closed 11 years ago

rikki-iki commented 11 years ago

Setup basic HTML 5 structure ensuring correct semantics and elements are used

rikki-iki commented 11 years ago

Using <time> element for article post dates (see: html5doctor.com/the-time-element/), but without 'pubdate' as it appears to have been dropped from WHATWG and W3C specs (see: http://www.brucelawson.co.uk/2012/best-of-time/).

rikki-iki commented 11 years ago

Using the <main> element now that it has been added to W3C spec (see: http://html5doctor.com/the-main-element/)

rikki-iki commented 11 years ago

The banners <header> element doesn't have to have a heading element in it, the logo on it's own is ok (see: http://www.w3.org/html/wg/drafts/html/master/sections.html#the-header-element).

I also don't believe my site name / logo needs to be in a <h1> (it's a few years old now and HTML5's sectioning abilities change the story a little, but I still agree with this article: http://csswizardry.com/2010/10/your-logo-is-an-image-not-a-h1/)

rikki-iki commented 11 years ago

In the blog post markup I've kept the <header> to a single <h1> with the excerpt as a <p>. This is because I don't want the excerpt to because the h1-6 elements semantically mean a new section or subsection (see: http://html5doctor.com/howto-subheadings/).

I can style them as being more prominent than a regular <p> but their inclusion in the <header> element is enough to semantically indicate it as a tagline. Keeping style separate to content.

rikki-iki commented 11 years ago

Completed by commit: https://github.com/rikki-iki/ikalator.github.com/commit/8d84c8d81ddf35a40b14b8197d1aba8706cf617e