HTML and CSS Reference
In-Depth Information
For all practical purposes, all that is different from standard HTML in this example is
the <!DOCTYPE> statement. Given such minimal changes, of course, basic HTML5 will
immediately render correctly in browsers, as demonstrated in Figure 2-1.
As indicated by its atypical <!DOCTYPE> statement, HTML5 is not defined as an SGML
or XML application. Because of the non-SGML/XML basis for HTML, there is no concept of
validation in HTML5; instead, an HTML5 document is checked for conformance to the
specification, which provides the same practical value as validation. So the lack of a formal
DTD is somewhat moot. As an example, consider the following flawed markup:
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> Hello Malformed HTML5 World </title>
<!-- note bad close tag below -->
<h1> Hello Malformed HTML5 <h1>
<!-- unknown tag found here -->
<p> Welcome to the <danger> future </danger> of markup! </p>
<!-- missing </body> -->
F IGURE 2-1 HTML5 is alive.
Search WWH ::

Custom Search