Today I came across a site, which explained very beautifully about HTML 5. The post was focused on Advantages of HTML5 over earlier versions. I thought I would share some of the very very Important points to our Readers too.
Here we go.
1. No Doctype Specification is required
No need to remember that long <!Doctype specification Now, it is simple we can just mention in very short form <!DOCTYPE html>
2. Forget about writing complex CSS for Image and Its Caption
We have Fig element. which makes our lifes even easier, the sample ex is
<figure> <img src="path/to/image" alt="About image" /> <figcaption> <p>This is an image of something interesting. </p> </figcaption> </figure>
3. Forget about writing type specification for scripts and links
HTML5 allows you to not mention type attribute for scripts and links
<link rel="stylesheet" href="path/to/stylesheet.css" /> <script src="path/to/script.js"></script>
4. Email Text box
HTML5 allows input type=”email” as a text box which takes only a valid email ID
<input id="email" name="email" type="email" />
5. Form validation is Very Simple from Now onwards
HTML5 allows built in form validation in which we can specify most of our repetitive tasks like, email validation, inputs based on regular expression, place holders, autofocus on page load and many more things.
<input name="email" type="email" placeholder="info@adrevol.com" />
<input type="text" name="someInput" required />
<input type="email" name="someInput" placeholder="info@adrevol.com" required autofocus />
<input type="text" name="username" id="username" placeholder="4 <> 10" pattern="[A-Za-z]{4,10}" autofocus required />If you would love to read more information on HTML 5 with Loads of information with sample examples, Then You must see this 25 HTML 5 features Developer must know
