Monday, March 22, 2010

Structures, Semantics, Controls, and More: HTML5 is Here!

Char James-Tanny

Problem getting started; Char's computer won't connect to the projector. A presenter's nightmare.

HTML5 development began June of 2004. The working draft was finished in January of 2008.

We've gone from tables for layout to DIV tags with IDs, to structured areas, semantically structured areas. First public working draft in 2008, W3C Candidate Recommendation due in 2012, and W3C Recommendation in 2022(!).

We don't have to wait until 2012 to use HTML5.

New doctype declaration is . That's it. Not guaranteeing page will be valid.

Structural (semantic) elements will include header, nav, article, section, aside, and footer. Doesn't define where they go on a page.

Other new elements include audio and video, canvas, command, database, figures and figure captions, mark, and time.

Browsers are backward compatible, so HTML5's audio and video capabilities won't kill off Flash and Silverlight.

The canvas tag is for drawing. Check out Sketchpad.

Validation is automatic with input field typing. The field types include date, email, file, number, range, text, and url. It means you don't have to use scripting to do a lot of form validation.

Not only can you use the new figure element for graphics, you can use the figcaption element, places within the fig element, for captions.

As far as element and attribute syntax, there are no rules. You can mix case, use double, single, or no quotes, closing tags aren't required for void elements. It allows for easier conversion from older specs. Just be consistent.

Other new controls include drag & drop, editable areas, geolocation, and client-side storage.

Important changes. No attributes on body tag.  Can link block level elements of content. You can create anchors (for link targets) with an id tag, which means you don't have to add an a tag.

1 comment:

  1. Looks like the DOCTYPE got dropped :-) It's:

    <!DOCTYPE html>

    ReplyDelete