1. New Doctype
2. Figure Element
Code Used
- <!DOCTYPE html>
- <html>
- <body>
- <p>
- <strong>Starfish or sea stars are echinoderms belonging to the class Asteroidea. The
- names "starfish" and "sea star" essentially refer to members of this class.</strong></p>
- <figure>
- <img src="img1.jpg" alt="star fish" width="600" height="600">
- </figure>
- </body>
- </html>


3. <small> Redefined
4. No More Types for Scripts and Links
- <script type="text/javascript">
- alert("Hi from JavaScript!");
- </script>
- <script type="text/javascript" href="ajaxtcr.js">
- </script>
- <link rel="stylesheet" media="screen" href="global.css" type="text/css" >
5. To Quote or Not to Quote
<p class=myClass id=someId> Start
6. Spellcheck Attribute
- <p spellcheck="true">Spellcheck on: There is a tyyypooo here.
- Did the browser spot it?</p>
7. Placeholders and Autofocus Attribute
- <input type="text" name="firstname" id="firstname" value="Thomas">
- <input type="text" name="middlename" id="middlename" value="Enter your middle name here">
- <input type="text" name="firstname" id="firstname" placeholder="Enter your name here">
- <label>Search:<input type="search" name="query" id="searchBox" autofocus></label>
- <input type="text" name="firstname" id="firstname" placeholder="Enter your name here" autocomplete>.
- <!DOCTYPE html>
- <html>
- <body>
- <form>
- <input type="text" name="fname" placeholder="First name"><br>
- <input type="text" name="lname" placeholder="Last name"><br>
- <input type="submit" value="Submit">
- </form>
- <p>
- <strong>Here see use of Placeholder.</strong></p>
- </body>
- </html>


8. Web Storage in HTML 5
Storing data in HTML is easy to do but it requires JavaScript, and it can only store data as long as the application and browser are open. As soon as the user's session ends, the data is lost. One more thing is that data stored in HTML is visible to everyone.
Cookies are limited to around 4KB of data, which is not a lot of space to store information. Plus, cookies are sent with every HTTP request and that can slow down your application. HTML5 local storage provides you with more space that is associated with the user agent and is only transferred to and from the server when the application asks for it.
Now first we understand, what is Web Storage?? The answer is Web Storage is a separate API that was originally part of the HTML5 Specification, but now is a separate document in the aegis of HTML5. It is sometimes called Local Storage or DOM Storage depending upon the browser manufacturer. Web Storage allows users to store data in key/value pairs on the user's local machine. This data persists even if the user leaves the application or closes the browser.
Note: Web Storage is different from cookies.
There are two types of Web Storage as in the following:
- Session Storage.
- Local Storage.
Local Storage is name/value pairs stored on the local disk. Every site has a separate storage area. The data stored in this area persists even if the user leaves the site or closes the web browser. The data is only available to the domain that added it, and that data is only sent when a client on that domain requests it.
When you store data in Web Storage, it will be stored as a string. This means that if you have structured data (such as database information) or integers and floating-point, you need to convert them to strings so that they can be stored in Web Storage. Use parseInt( ) and parseFloat( ) methods to convert yours integers and floats back when you retrieve the data. Local storage is best for storing non-sensitive data that takes up a lot of space.
Session storage is name/value pairs that are stored on the local disk for the length of the page session. Session storage will deliver stored data to user agents on the same domain and in the same window as to when the data was stored. After that window closes the stored data is removed. If a new window is opened to the same site, a new instance of session storage is created. Session storage is most useful for temporary data that should be saved and restored if the browser session is accidentally refreshed. But you do not store sensitive data in session storage like local storage. You should check to ensure that the browser supports Web Storage using a function as in the following:
- function supportsWebStorage( )
- {
- Try
- {
- Return 'localStorage' in window && window['localStorage'] !== null;
- }
- catch (e)
- {
- Return false;
- }
- }
When using Web Storage, the first thing you do is define a storage object. This tells the user agent whether you're using local storage or session storage.
These objects are:
- Window.localStorage.
- Window.sessionStorage.
9. The Semantic Header and Footer
<div id= "header">
…………
</div>
<div id= "footer">
…………
</div>
Divs, by nature, have no semantic structure, even after an id is applied. Now, with HTML5, we have access to the <header> and <footer> elements. The mark-up above can now be replaced with:
<header>
…….
</header>
<footer>
……...
</footer>
In detail,
HTML5 documents may contain a header element, that is used to set the header section of a document and thus often contains the standard h1 to h6 heading elements:
Similarly, a footer element is provided for document authors to define the footer content of a document, that often contains navigation, legal, and contact information:
Code Example
- <header>
- <h1>Welcome to the Future World of HTML5.</h1>
- <h2>Magical World</h2>
- </header>
- <footer>
- <p>Copyright</p>
- </footer>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>HTML5 header and footer example</title>
- </head>
- <body>
- <header>
- <h1>Welcome to the Future World of HTML5.</h1>
- <h2>Magic World</h2>
- </header>
- <p>
- See example</p>
- <p>
- Powerful language</p>
- <footer>
- <p>Coyright.</p>
- </footer>
- </body>
- </html>


10. Required Attribute
- <input type="text" name="firstname" id="firstname" required>
- <!DOCTYPE html>
- <html>
- <body>
- <form>
- Email:
- <input type="text" name="email" required>
- <input type="submit">
- </form>
- <p>
- <strong>Example of Required Attribute</strong></p>
- </body>
- </html>

Check Output

11. Video Support
- <video src="2012.mp4"
- width="480" height="360" controls>
- <strong>HTML5 video element</strong>
- </video>
- <!DOCTYPE html>
- <html>
- <body>
- <video width="480" height="360" controls>
- <source src="2012.mp4" type="video/mp4">
- <source src="2012.ogg" type="video/ogg">
- Your browser does not support the video tag.
- </video>
- </body>
- </html>
Check this

12. Audio Support
- <audio src="coffee music.wav"></audio>
- <audio controls autobuffer autoplay>
- <source src="Coffee music.ogg" type="audio/ogg">
- <source src="Coffee music.wav" type="audio/wav">
- </audio>
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>HTML5 audio</title>
- </head>
- <body>
- <h1>
- Simple Audio</h1>
- <h2>
- wav Format</h2>
- <audio src="coffee music.wav" controls></audio>
- <h2>
- ogg Format</h2>
- <audio src="coffee music.ogg" controls></audio>
- <h2>
- Multiple Formats and Fallback</h2>
- <audio controls autobuffer autoplay>
- <source src="coffee music.ogg" type="audio/ogg">
- <source src="coffee music.wav" type="audio/wav">
- </audio>
- </body>
- </html>
Check

13. Header Group <hgroup>
Code Example
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>hgroup Example</title>
- </head>
- <body>
- <header>
- <hgroup>
- <h1>Welcome to the HTML5 World</h1>
- <h2>Header Group</h2>
- </hgroup>
- <nav>
- <ul>
- <li><a href="#">Link</a></li>
- <li><a href="#">Link</a></li>
- <li><a href="#">Link</a></li>
- <li><a href="#">Link</a></li>
- </ul>
- </nav>
- </header>
- <hgroup>
- <h1>Section head</h1>
- <h2>A subhead</h2>
- </hgroup>
- <p>
- This is the best way</p>
- <p>
- Best part of HTML5</p>
- <footer><p>HTML 5</p></footer>
- </body>
- </html>
Check


Ramakrishna PathuriPosted Aug 30, 2013, 3:05 AM
I think One main concept was missed i.e it supports Web Responsive Design using Of media queries.
Gakenh01Posted Aug 1, 2013, 2:51 PM
Nice rundown on HTML 5
Tripti TiwariPosted Aug 1, 2013, 12:32 PM
Thank You Sir!!
Dinesh BeniwalPosted Aug 1, 2013, 11:16 AM
appreciate your hard work Tripti.