HTML 5

We all are familiar with HTML. Now HTML 5 is the latest version of markup language. HTML 5 has a semantic structure. In HTML 5 we have been given some controls that will save your time when developing. Now we will see what all the controls and features are that were introduced in HTML 5.
Before we start, please ensure that you have installed Visual Studio 2010 SP1 (or later).
Then enable the HTML option in the target section.
Got to Tools -> Options -> Text Editor -> HTML.
html
HTML 5 Markup
HTML 5 Example
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Sibeesh Passion wish you a happy new year</title>
  6. </head>
  7. <body>
  8. Welcome to Sibeesh Passion</body>
  9. </html>
Structure of HTML5
As I said earlier, HTML 5 has a semantic structure. It reduces the efforts of a UI developer. The following image will explain the structure.
As you can see in the preceding image, HTML 5 has introduced:
Adding our own elements!
Yes, it is true, we can create our own element by introducing some styles, now we will see how to do this.
To do this we need a markup as follows.
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Your own element </title>
  5. <script>document.createElement("yourelement")</script>
  6. <style>
  7. yourelement {
  8. display: block;
  9. }
  10. </style>
  11. </head>
  12. <body>
  13. <div>
  14. Normal element
  15. </div>
  16. < yourelement >My element</ yourelement >
  17. </body>
  18. </html>
Please note that we have created a new element yourelement.
Cool.
See you soon in the next part.
Kindest Regards,
Sibeesh Venu