Difference Between HTML and HTML5

posted in: HTML5 | 0

Summary:

HTML 5 adds new elements to specifically identify each of these common constructs:

header: The page header shown on the page; not the same as the head element

section: A part or chapter in a book, a section in a chapter, or essentially anythingthat has its own heading in HTML 4

nav: A collection of links to other pages

article: An independent entry in a blog, magazine, compendium, and so forth

footer: The page footer where the fine print goes; the signature in an e-mail message

HTML5

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

<title> == HTML 5 == </title>

</head>

<body>

<header>

<h1><a href=”#”>Hobo Web</a></h1>

</header>

<section>

<article>

<h2><a href=”#”>Test Page 1</a></h2>

<p>Article Text here</p>

</article>

<article>

<h2><a href=”#”>Test 2</a></h2>

<p>Article Text 2 here</p>

</article>

<nav>

<a href=”#”>« Previous Entries</a>

</nav>

</section>

<nav>

<ul>

<li><h2>Hobo Stuff</h2>

<ul>

<li><a href=”#”>Comment Policy</a></li>

<li><a href=”#”>Todo List</a></li>

</ul>

</li>

<li><h2>Archives</h2>

<ul>

<li><a href=’#’>April 2008</a></li>

<li><a href=’#’>March 2008</a></li>

<li><a href=’#’>February 2008</a></li>

<li><a href=’#’>January 2008</a></li>

</ul>

</li>

</ul>

</nav>

<footer>

<p>Copyright 2008 Hobo Web LTD</p>

</footer>

</body>

</html>

HTML

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />

<title> == HTML == </title>

</head>

<body>

<div id=”page”>

<div id=”header”>

<h1><a href=”#”>Hello Web</a></h1>

</div>

<div id=”container”>

<div id=”center”>

<div id=”post-102″>

<h2><a href=”#”>Test Page 1</a></h2>

<div>

<p>Article Text here</p>

</div>

</div>

<div id=”post-101″>

<h2><a href=”#”>Test 2</a></h2>

<div>

<p>Article 2 Text here</p>

</div>

</div>

</div>

<div>

<div>

<a href=”#”>Previous Entries</a>

</div>

<div></div>

</div>

</div>

<div id=”right”>

<ul id=”sidebar”>

<li><h2>Hobo Stuff</h2>

<ul>

<li><a href=”#”>Comment Policy</a></li>

<li><a href=”#”>Todo List</a></li>

</ul>

</li>

<li><h2>Archives</h2>

<ul>

<li><a href=’#’>April 2008</a></li>

<li><a href=’#’>March 2008</a></li>

<li><a href=’#’>February 2008</a></li>

<li><a href=’#’>January 2008</a></li>

</ul>

</li>

</ul>

</div>

<div id=”footer”><p>Copyright 2008 Hobo Web LTD</p></div>

</div>

</body>

</html>

Previous Post
Next Post

Leave a Reply