html5 document structure

html5 document structure

Basic html5 document structure (passes W3C html5 validation):

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>page title</title>
</head>
 
<body>
<header>
	header
</header>
<nav>
	navigation
</nav>
<article>
	<section>summary</section>
</article>
<aside>
	sidebar
</aside>
<footer>
	footer
</footer>
</body>
</html>

Advanced html5 document structure (passes W3C html5 validation):

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>page title</title>
<link href="style.css" rel="stylesheet" />
<script src="script.js"></script>
<script>
//<![CDATA[
	alert('javascript enabled');
//]]>
</script>
<style>
	body { background-color: #fff; }
</style>
</head>
 
<body>
<header>
	header
</header>
<nav>
	navigation
</nav>
<article>
	<header>
		<h1>article title</h1>
	</header>
	<section>
		<hgroup>
			<h2>article header</h2>
			<h3>article subheader</h3>
		</hgroup>
		<p>summary</p>
	</section>
	<footer>
		posted on <time datetime="2011-09-10T10:25:10+02:00">september 10th 2011</time>
	</footer>
</article>
<aside>
	sidebar
</aside>
<footer>
	footer
</footer>
</body>
</html>

HTML5 tags.

HTML5 IE support.

VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">