A newbie question about HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

A newbie question about HTML

I see this at times in .html files: <!DOCTYPE html> But what does this mean? Or is it just a comment?

6th Jul 2017, 1:46 PM
Odin Angus
Odin Angus - avatar
7 Answers
+ 1
It is used to signify the type of document. In your example, that signifies HTML5. The browsers and IDEs utilize this so it knows what information to feed back to you, such as errors or things that are deprecated. As well, it lets many IDEs know what type of predictions to give to you, and what type of errors to present to you.
6th Jul 2017, 2:08 PM
AgentSmith
+ 7
It means Document type html And do you know this tag is very long in html 4
6th Jul 2017, 1:52 PM
Art456
Art456 - avatar
+ 3
nice this question becomes the ref as it contains @dayve answers
6th Jul 2017, 2:05 PM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar
+ 2
Does it matter if you remove this thing?
6th Jul 2017, 1:50 PM
Odin Angus
Odin Angus - avatar
- 1
it explain that you are using standard HTML documentation.
6th Jul 2017, 1:49 PM
Hello Buddy
Hello Buddy - avatar
- 2
it doesnt matter. just ignore it and you will not get errors.
6th Jul 2017, 1:52 PM
Hello Buddy
Hello Buddy - avatar