What is a DOCTYPE in html ?
DOCTYPE should be declared first before entering the HTML tags.
DOCTYPE is not a html element or a tag.
DOCTYPE is used to provide instructions to the web browser about what version of HTML the page is written.
DOCTYPE is supported in all the browsers.
How to declare DOCTYPE ?
DOCTYPE declaration differs from versions of documents created by the user.
Syntax :
<!DOCTYPE html>
Example
<!DOCTYPE html>
<head>
<title></title>
...
</head>
<body>
...
...
</body>
</html>
HTML coding for a website !!!
Click to Learn More about – HTML Tutorial for beginners
For HTML 5
<!DOCTYPE html>
For HTML 4.01 Strict
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
For HTML 4.01 Transitional
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
For HTML 4.01 Frameset
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
For XHTML 1.0 Strict
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
For XHTML 1.0 Transitional
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
For XHTML 1.0 Frameset
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
For XHTML 1.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Browser Compatibility
Sno | Browser | Support |
1 | Chrome | Yes |
2 | Firefox | Yes |
3 | Edge | Yes |
4 | Opera | Yes |
5 | Safari | Yes |
6 | Internet Explorer | Yes |
Hi my friend! I want to say that this post is awesome, great written and include almost all vital infos. I would like to see more posts like this . Connie Adelbert Dahl
Thanks a lot for your love and support.
If the tutorial is good please share it to your friends.
Thanks.
The steps are very clear that we can easily understand and act according to them. They are very helpfull. Beverly Godart Kiah
Thanks a lot for your love and support.
If the tutorial is good please share it to your friends.
Thanks.
Only wanna comment that you have a very decent site, I like the style it really stands out. Christian Consalve Warila
Thanks a lot for your love and support.
If the tutorial is good please share it to your friends.
Thanks.
Greate article. Keep writing such kind of information on your blog. Miran Urson Emmit
Thanks a lot for your love and support.
If the tutorial is good please share it to your friends.
Thanks.