+ 10
What declaration should all HTML files start with and what is the uses of it ?
10 Answers
+ 6
<!DOCTYPE HTML>
+ 5
-;#
<!DOCTYPE HTML> This declares this is a html file .. For different version you need to add some documentation of version's
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
But in this version html5 not necessary to add documentation... Browser already supports this is html documentation .
+ 4
This is what I have understood:
This is declaration for HTML 5.
For other version, it was pretty long and not necessary.
It informs browser that doctype is HTML.
And you need detailed explanation - wait for a moment.
edit:
see here
https://www.w3schools.com/tags/tag_doctype.asp
https://stackoverflow.com/questions/414891/what-is-doctype
+ 3
you can use <meta> they are used for many things search you can search it online
+ 3
<html>
This is also an alternative
It shows that the type is of a HTML Language.
+ 2
<!DOCTYPE html>
That's the declaration to use. It is a command telling the system that this code is html 5 or html 4 (the version). It is important to use it
+ 2
In short, it defines the code.
+ 2
<! DOCTYPE HTML>
+ 2
Also add the meta charset as high as possible in your html page, since most browsers used to re-proces the whole page once they read the charset. Meaning everything read before could be thrown away in case it was read in the wrong charset.
+ 1
<!DOCTYPE HTML>
it tells the system that what is below is a html code