WHAT’S UP, HTML5?
New in HTML5
A new DOCTYPE
New elements and attributes
Obsolete 4.01 elements
APIs
A minimal DOCTYPE
The HTML5 declaration is short and sweet:
<! DOCTYPE html>
Compare that to a declaration for a Strict HTML 4.01 document:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"[Link]
HTML5 does not have a DTD, which is why we have the simple DOCTYPE
declaration.
Elements and attributes
Besides the new input element which were introduced in the previous slide
such as: color, date, datetime… HTML5 also introduce new elements and
atributes
Organizing Page Content with HTML5
elements
Article
Section
Aside
Header
Footer
address
Article and Section
To divide long web documents into thematic sections
One section can contain many articles or one article can contain many
section
Aside (sidebars)
The aside element identifies content that is related but tangential to the
surrounding content
Navigation
The new nav element gives developers a semantic way to identify
navigation for a site
Headers
Header can appear at the beginning of the web page or in an individual
article or section
Footer
New global attributes
For complete attributes look at table 10-2
Obsolete HTML 4.01 Markup
APIs
Editing API
Drag and Drop API
Canvas AP
Web Storage API
Geolocation API
Web Workers API
Web Sockets API
Videos supported
Audio supported
Adding a video to a page
Adding audio to a page
Canvas
The canvas element creates an area on a web page that you can draw
on using a set of JavaScript functions for creating lines, shapes, fills, text,
animations, and so on.
Summary
Introduce new elements in HTML5: section, article, header…
Adding videos, audio to a web page
References
Jennifer Niederst Robbins, 2012. Learning Web Design 4th ed. Oreilly.