HTML and CSS Reference
In-Depth Information
▪
The Web Platform: Browser Technologies
, maintained by Mike Smith of the W3C (
plat-
▪
HTML5 Landscape Overview
, by Erik Wilde (
dret.typepad.com/dretblog/html5-api-over-
▪
Web Platform Docs
(
docs.webplatform.org/wiki/apis
)
HTML5 Document Structure
HTML5 has only one version and does not reference a DTD, but HTML5 documents still re-
quire a simplified DOCTYPE declaration to trigger standards mode rendering in browsers.
The following is the minimum recommended structure of a basic HTML5 document:
<!DOCTYPE html>
<html>
<head>
<title>
Document Title
</title>
</head>
<body>
Content of document . . .
</body>
</html>
HTML5 documents written in XML syntax do not require a DOCTYPE but may include an
XML declaration. They should also be served as the MIME type
application/xhtml+xml
or
application/xml
. The following is a simple HTML5 document written in the XML syntax:
<?xml version="1.0" encoding="UTF-8"?>
<html
xmlns=
"
http://www.w3.org/1999/xhtml
">
<head>
<title>
Document Title
</title>
</head>
<body>
Content of document . . .
</body>
</html>