HTML 5
<section>
<article></article>
<article></article>
</section>
HTML 4
<div>
<div></div>
<div></div>
</div>
Both of these have to be aligned by CSS. What exactly is the use of HTML 5? Yes there are form tags in HTML 5 that are very useful, but I'm concerned with the above.
HTML5 gives developers more control over the performance of their websites. Many of the Flash and JS-based hacks commonly used in HTML4 are now elements inherent to the language. These changes also allow for a faster and smoother user experience.
HTML 5 is the latest and more advanced version of HTML 4. HTML5 comes with new tags, new features, and has simplified various functions.
This makes it perfect for any business to make use of from start-up to enterprise. What makes HTML5 better? One of the biggest changes which HTML5 brings is the ability to present video and audio on your site without having to use flash or an external media player. This wasn't possible in HTML4.
HTML 4 is generally supported by many third-party elements, such as Flash. HTML 5 is fully supported by multimedia. HTML 4 has no provisions for new tags. HTML 5 introduces many new tags, such as canvas, audio, video, etc.
One word: semantics.
See http://www.webmonkey.com/2010/02/building_web_pages_with_html_5/#Semantic_structure_at_last
EDIT: To paraphrase the article, by request (and rightly so), HTML 5 has added a set of new tags, such as article
, section
, nav
, header
, footer
, and others that have, traditionally, been created manually in HTML 4 by using div
tags and semantic ID values (eg. <div id='header'>
.
By creating these new semantic tags, it allows for easier to understand markup for humans, as well as being easier to parse semantically by machines. For example, it will be easier to write code that crawls web pages looking for article content (think blog search) with a standardized tag, rather than having to search pages full of div
s.
A few reasons off the top of my head:
1) It's more explicit and space saving to separate specific components of your website Example:
<section>
<article>
</article>
</section>
vs.
<div class='section'>
<div class='article'>
</div>
</div>
It's also takes up less space to directly reference each of these parts in CSS or JavaScript.
2) Similarly, it can be easier for screen readers and the like to extract useful information from a page for those who are blind or visually impaired.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With