Tuesday, March 15, 2011

HTML5 to the Point

Scott DeLoach is talking at the first of back-to-back session on HTML5 today. (I skipped the early morning session; I didn't se a whole lot relevant, plus I wanted to take the time to get a resume critique from Jack Molisani--and I now have a boatload of work to do on that fromt.)

The HTML5 doctype is simple: <!DOCTYPE html>. It's simplified. Can use two syntaxes. Most people use the HTML and not the XHTML.

HTML5 has a number of unsupported attributes. All have HTML5 alternates. Probably the biggest thing? No framesets. Can use iframes though. So many doc tools use framesets for their HTML output. Can also use float property.

A lot of new tags/elements. Need style definition for old browsers. Set them as display:block in CSS. Then test to make sure it'll work. Might also need to create styles specifically for older browsers.

When yo say you support HTML5, you need to support all the features.

New tags to structure documents, such as header, nav, section, article, aside, and footer. Don't need to use div tags to structure documents anymore. section & article have a lot of overlap. They are similar to each other. Idea of article is something that can stand alone. A section is not really a standalone thing.

If you just save as HTML5, you won't know how tags get used. But if you plan your document structure up front, the tags gain power.

HTML5 has new elements. New audio & video tags. Canvas is another. Idea of canvas is alternative to having a graphic, a way to draw in code. Can have things animate and move around. Might be easier than using Flash. Still kind of a pian writing the code now, until tool come along. You can add captions with the figcaption tag. Forms are improved in HTML5. New things you can do with the input tag.

YOu can now make content editable with the contenteditable attribute. You can make elements draggable with the draggable attribute. You can allow users to spell check form fields with the spellcheck attribute.

innerHTML() is a method that';s now part of HTML5, instead of being proprietary. hasFocus() is an element that will be very useful for creating context-sensitive help.

HTML5 provides a long list of new events, taken from the best of the various browsers and now made standard.

Form elements have been enhanced. A required attribute make a form field required before users submit a form. HTML5 provides validation for different types of data, such as email addresses or URLs.

No comments:

Post a Comment