I have been working with HTML 5 from its starting days and Here I’ll discuss that why does I like it and several features of the HTML 5 that make easier to write the web page.
– You can decrease the content size with HTML 5 and can write more clear content that is much easier to understand. Can you write the DOCTYPE in the old html? May be you will face the problem to write or you can copy form somewhere.
See yourself the declaration of the DOCTYPE in both:
In previous HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
HTML 5 allows us to write the document type by just writing:
– Next, the declaration of the type encoding is a bit easier to write and use in HTML 5
– There are many other new elements, such as <section>, <article>, <header> <aside> and <nav>, are designed to enrich the semantic content of documents. HTML5 allows you to write clear and easy to read code,you can see in the following code samples:
Let’s consider the old html style to write the code
<div id="header"> <h1>Header Text</h1> <div id="nav"> <ul> <li><a href="#">LinkA</a></li> <li><a href="#">LinkB</a></li> </ul> </div> </div> <div id="content"> <p>Welcome to authorcode</p> </div> <div id="footer"> <p>Authorcode</p> </div>
Now check the following code. You can easily read and understand the content.
<header> <h1>Header Text</h1> <nav> <ul> <li><a href="#">LinkA</a></li> <li><a href="#">LinkB</a></li> </ul> </nav> </header> <article> <p>Welcome to authorcode</p> </article> <footer> <p>Authorcode</p> </footer>
– When you want to implement audio and videos in your web page, the HTML 5 gives you relief from using the <embed> and <object> tags with the big list of parameters to working correctly. You can use just the <audio> and <video> tag.