Why is a !doctype HTML tag used in a HTML 5 code? Can't it be made without it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Why is a !doctype HTML tag used in a HTML 5 code? Can't it be made without it?

In my school my computer teacher told that I would know about it later when I finish my HTML course in school but i want to know about it now please tell me?

1st Aug 2018, 10:19 AM
Soumyajeet Routray
Soumyajeet Routray - avatar
4 Answers
+ 1
It specifies the html version you are using. It’s not html 5 without doctype declaration.
1st Aug 2018, 10:31 AM
Toni Isotalo
Toni Isotalo - avatar
+ 1
thanks
1st Aug 2018, 10:33 AM
Soumyajeet Routray
Soumyajeet Routray - avatar
0
<!DOCTYPE html> is used to create with HTML5 but if you remove it you will create a page with another html version
1st Aug 2018, 10:33 AM
Sousou
Sousou - avatar
1st Aug 2018, 11:01 AM
Meet Mehta
Meet Mehta - avatar