HTML and CSS Reference
In-Depth Information
HTML5
HTML5 can be a confusing term.
HTML5 includes a specification of a markup language for creating documents that can be
rendered in web browsers. As a markup language, HTML5 both extends and rationalises
earlier versions of HTML and XHTML.
As part of its extension of HTML, HTML5 offers a new set of tags to web site developers.
Many of these tags are designed to provide greater descriptive power to HTML. For in-
stance, HTML5 contains header and footer tags. These tags do not allow pages to do or
look any different than they did previously, and are one of the less interesting aspects of
HTML5; we will examine a subset of these new tags in this topic.
HTML5 also contains new tags to support audio and video, and a canvas for rendering 2D
shapes and bitmaps. It is these features of HTML5 that have drawn a lot of attention, partic-
ularly the way these features position HTML5 as a direct competitor to Adobe Flash. Apple
refuses to allow Adobe Flash on certain devices, arguing that websites should use HTML5
equivalents, since they are standards compliant, and do not require plugins. This topic will
largely ignore the multi-media aspects of HTML5, since they are usually not relevant for
web applications, but it is important to know they are there.
As part of its rationalisation of XHTML in particular, HTML5 acknowledges that the strict-
ness enforced by earlier versions of the HTML standards was both unnecessary (browsers
still rendered pages that broke the rules), and counter-productive (since there was no stand-
ard for how browsers should handle pages that were invalid in some way, it was left up to
each vendor). The HTML5 specification contains detailed rules for how browser vendors
should create a consistent Document Object Model from the input provided. A large part of
the HTML5 specification deals directly with these rules, and again, is beyond the scope of
this topic.
//
Don't worry if you are not familiar with the Document Object Model (it will be
explained below) or XHTML (it is largely obsolete).
HTML5 also enhances the form components available in HTML. In addition to providing
new types of input fields (such as date pickers and color pickers), HTML5 provides addi-
tional attributes on existing input fields. HTML5 also provides native validation of form
components.
Search WWH ::




Custom Search