Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

The Current and Evolving Standard: HTML5 53

3


rules are a direct result of the fact that to be valid, an XHTML document must be valid
XML as well. Here’s a list:


n All the tags in your document must be lowercase.
n Any tags that do not have closing tags must be closed using a slash after the tag
name. So the <br> tag would be written as <br />.
n All attributes must have a value. You’ll see later that some attributes don’t have
any values associated with them. XHTML requires that you use the attribute name
as the value in these cases. So they follow the form attribute="attribute".

The Current and Evolving Standard: HTML5


While the W3C is still involved in web standards, a new group , the WHATWG , is
busy creating a new standard for HTML: HTML5. The goal of HTML5 is to make sure
that the HTML standard accurately reflects the state of the Web as it exists now. The
WHATWG, or Web Hypertext Application Technology Working Group, includes repre-
sentatives from all the major browser makers and is writing an HTML specification that
includes only features that all the browser vendors have reached a consensus on support-
ing.


HTML5 does not demand that web pages be valid XML, relaxing some of the rules that
XHTML 1.0 imposed. However, today’s valid HTML or XHTML will still be valid in
HTML5 when it’s fully adopted.


While no current browsers offer 100% support for HTML5, most popular browsers sup-
port over 80%. To find out whether a particular browser offers support for an HTML5
feature, go to http://caniuse.com/, which maintains a list of all the features in HTML5 and
which version of each browser supports them, along with the percentage of users whose
browsers support that feature. For example, at the time of the writing, 87% of users cur-
rently have browsers that fully support the HTML5 form features. However, only 9% of
users have browsers that support SVG favicons.


Another important note about HTML5 is that the WHATWG has decided to do away
with the concept of versions for HTML period. The HTML specification is being writ-
ten to reflect the current and future state of the industry and will evolve over time with
browsers. This is a new experiment designed to make sure that the specification process
more accurately reflects the evolution of the Web.

Free download pdf