HTML5
HTML5 is the latest and greatest standard for HTML. It incorporatessome features of HTML4.01 and some of XML, but also brings many newexciting capabilities to the web including a graphics canvas, audio, andvideo capabilities.
HTML5 tightens the specification for HTML so there are fewer problemswith browsers interpreting things differently. It provides manycapabilities that previously required plugins and add-ons so that advancedcapabilities will be available across a wide array of Internetappliances.
For someone who likes to hand-code things, as I do, it’s also easierthan previous versions of HTML, although there is a lot more to learn,only because it is so capable.
HTML5 is still an evolving standard but already most major browsersimplement a large portion of it, enough so that it is currently possibleto include video, auto, and graphical content without the need forplugins. It is also easy to write code that is HTML5 compliant but alsobackwards compatible with older browsers.
Hello World!
Hello World!Hello World!
Notice that the DOCTYPE for HTML5 is simply “HTML”. Whatcould be simpler than that? The presence of this doctype putsbrowsers in standards mode so there is at least a chance they’ll dothe right thing.
Some sites don’t consider the language declaration to be important butI prefer not to make the browser guess and guarantee that the correctcharacter set is used to render the document.
Just as with previous versions of HTML, you have and theclosing tags surrounding the header and body.
The header section is enclosed in and tags and the body in
and tags, just as withprevious versions.HTML5 can be coded in either HTML format or XHTML format. If you wantto type
or
, either will work. Browsers will parseboth HTML5 and XHTML5 identically.
Many deprecated tags, such as