What is the mean of DOCTYPE in a html page?
Dung Do Tien May 29 2020 782
I am studying English, I don't know what is mean of DOCTYPE in an Html page?
I have tried to remove it from my HTML page but it still displays fine. Nothing happens.
Thank you for any explains.
Have 1 answer(s) found.
Marry Christ May 30 2020
DOCTYPE is used to inform the browser about the version of HTML used on a web page. It is not a tag and no display anything in the browser.
The latest version of Html is 5.0 (HTML5) so syntax looks like :
If you want using HTML version 4 you can declare as below:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Note: Why this is important? Because maybe as you know html5 support more many new tags If you declare version 4 and using some tag of version 5 some browser will not understand to display. So I recommend use the latest version of Html.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.