Html5 Doctype Header

Html5 Doctype Header

IT is important to tell browser about the content of HTML are HTML5 contents. It is achieved with the help of Doctype. Below is the syntax of HTML5 Doctype header.

Syntax:

<!DOCTYPE html>

As you can see above, we don’t require to any DTD reference as HTML5 is not derived from SGML.

Example:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

    <script>
    $(document).ready(function(){
        $("#Button1").click(function(){
      alert(‘Welcome To HTML5’);

        });  
    });
    </script>
</head>
<body>
<span>Enter DataBase Name: <input id="Text1" type="text" /></span>
<span>
<input id="Button1" type="button" value="Create DataBase" /></span>
</body>
</html>

HTML5 Doctype browser support

Almost all modern browsers support HTML5 doctype.

NOTE: <!Doctype> is not a case sensitive. It also does not require end tag. 

Tags:

Basic HTML5 TagsHTML5 TutorialHTML5 With DataBaseHTML5 Video Player TutorialASP.net HTML5 Generate Article TagHTML5 Slider control and JavaScriptHTML5 audio player tutorialHTML5 Canvas AnimationCheckbox Check all GridviewYouTube Transcript Fileasp.net Gridview checkbox

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.