logo_HZ

Designing a blog with html5

This article was updated 27 May 2014 to use the

element to denote the main content of the page (was previously

).

Much of HTML 5’s feature set involves JavaScript APIs that make it easier to develop interactive web pages but there are a slew of new elements that allow you extra semantics in your conventional Web 1.0 pages. In order to investigate these, let’s look at marking up a blog…. Firstly what we’ll do is use the

`header`,

`footer`,

`main` and

`nav` elements to mark up the broad structure of the page.

**Doing this will make your site more accessible to real people who use some assistive technologies.**

Next, we’ll make the blog comments form much smarter by using the new data types and built-in validation available in HTML 5-aware browsers…. Then we’ll do some work on the guts of the page, using HTML 5’s

`article` elements to better mark up blog posts and comments and show how to use the sectioning elements to better structure accessible hierarchical headings on sites that are CMS-driven. As blogs are chronologically ordered, we’ll see what HTML 5 offers us for representing dates and times.

So take the phone of the hook, and make a cup of tea and we’ll get started…. You’ve been warned, so at the top of your document, you need the line

``.

Some sites “use” HTML 5, when in actual fact all they’ve done is take their existing code and change the DOCTYPE. That’s fine and dandy if you’ve been using valid, semantic code as HTML 5 is very similar to valid HTML 4.01. Eric Meyer mentions small differences like “not permitting a value attribute on an image submit”, and there are a few differences between the languages, summarised in the document HTML 5 differences from HTML 4…. However, I don’t want simply to rebadge my existing code, but to use some of the new structural elements now…. ## Using some new structural elements

My blog – like millions of others – has a header denoted by

`

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top