Difference between HTML 4 and HTML 5

Posted by Marcus Antonius - September 18, 2009. in html |

Continuing the theme of Tuesday, we decided to illustrate the differences between HTML 5 and html 4 and you will see that there are no big differences and that the new information only came to help.

For example, let's see a simple page of a blog, with the header at the top, the footer at the bottom of some posts, a navigation section, and a sidebar with the code shown below:



 <div id="page">

 <div id="header">

 <h1> <a href="http://marcusantonius.info"> Marcus Antonius: Web Beta </ a> </ h1>
 </ Div>


 <div id="container">

 <div id="center" class="column">

 <div id="post-102" class="post">

 <h2> <a href="/page-test-2/">
 Test Page 2 </ a> </ h2>


 <div class="entry">

 Text Here </ div>
 </ Div>


 <div id="post-101" class="post">

 <h2> <a href="/page-test/">
 Test 1 </ a> </ h2>


 <div class="entry">

 Text Here </ div>
 </ Div>
 </ Div>


 <div class="navigation">

 <div class="alignleft">
 <a href="/blog/page/2/"> 'Old Posts </ a> </ div>


 </ Div>
 </ Div>


 <div id="right" class="column">

 <ul id="sidebar">

	 <li>

 <h2> Information </ h2>


 <ul>

	 <li> <a href="/contato"> contact </ a> </ li>


	 <li> <a href="/curriculo/"> curriculum </ a> </ li>

 </ Ul>
 </ Li>


	 <li>

 <h2> Files </ h2>


 <ul>

	 <li> <a href="/blog/2009/04/"> April 2009 </ a> </ li>


	 <li> <a href="/blog/2009/03/"> March 2009 </ a> </ li>


	 <li> <a href="/blog/2009/02/"> February 2009 </ a> </ li>


	 <li> <a href="/blog/2009/01/"> January 2009 </ a> </ li>

 </ Ul>
 </ Li>

 </ Ul>
 </ Div>


 <div id="footer"> Marcus Antonius: Web Beta © 2009 </ div>
 </ Div> 

Here the same page in the rules of W3C for the HTML 5 :




 <h1> <a href="http://marcusantonius.info"> Marcus Antonius: Web Beta </ a> </ h1>






 <h2> <a href="/page-test-2/">
 Test Page 2 </ a> </ h2>


 Text Here




 <h2> <a href="/page-test/">
 Test 1 </ a> </ h2>


 Text Here



 <a href="/blog/page/2/"> 'Old Posts </ a>




 <ul>

	 <li>

 <h2> Information </ h2>


 <ul>

	 <li> <a href="/contato"> contact </ a> </ li>


	 <li> <a href="/curriculo"> curriculum </ a> </ li>

 </ Ul>
 </ Li>


	 <li>

 <h2> Files </ h2>


 <ul>

	 <li> <a href="/blog/2009/04/"> April 2009 </ a> </ li>


	 <li> <a href="/blog/2009/03/"> March 2009 </ a> </ li>


	 <li> <a href="/blog/2009/02/"> February 2009 </ a> </ li>


	 <li> <a href="/blog/2009/01/"> January 2009 </ a> </ li>

 </ Ul>
 </ Li>

 </ Ul>





 Marcus Antonius: Web Beta © 2009 

He noted that the code was cleaner and more understandable?

Some elements were added and with that we no longer need to put the divs and layout was much more understandable. If you failed to notice the elements that were added are listed below with a brief explanation:

  • section: A section, as a chapter or section of a book.
  • header: The header of the displayed page.
  • footer: The footer of the page displayed as a subscription e-mail.
  • nav: A collection of links.
  • article: An article, an independent entry in a blog, magazine, newspaper, and so on.

As there came the final version of html 5, this was only a draft, the final version may have some differences.

Source: treinaweb

Post to Twitter

Tags: ,

3 Comments

Marcus Antonius
September 18, 2009 at 15:31

post updated! missed some tags, but my good friend warned me @ isaacmarinho. Thanks Isaac!


Isaac Marino
September 18, 2009 at 15:38

I've really missing the tags you quoted ... = D

But okay. Post updated ball forward. =)

Need, we are here.

Falow!


Juliana Lima
September 22, 2009 at 15:13

Very good blog! = Dddddd


Comment

Spam Protection by WP-SpamFree

Copyright © 2010 Marcus Antonius All rights reserved.
Portfolio | Resume | Contact | Twitter | RSS