Does the <!DOCTYPE HTML> replace the old <HTML> tag, and therefore must there also be a closing tag? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Does the <!DOCTYPE HTML> replace the old <HTML> tag, and therefore must there also be a closing tag?

What about the <meta> tag?

6th Feb 2019, 3:16 AM
Colin Morse
Colin Morse - avatar
3 Answers
+ 4
No it's not, it is only used in the beginning of document, as document type declaration (DTD). There are various DTD defined, here's a list from W3C https://www.w3.org/QA/2002/04/valid-dtd-list.html
6th Feb 2019, 4:25 AM
Ipang
+ 3
You will get a clarity if you search how html4 and before were structured, they used to specify version details but in html5, <!doctype HTML> will say it's a latest version of html5 look it's all about version. <Meta> in prefer go to MDN website search meta you will see reference of meta tags.
6th Feb 2019, 4:54 AM
UwU Discover Me
+ 2
Thank to both of you for the fast answers. What a cool community this is :)
6th Feb 2019, 4:55 AM
Colin Morse
Colin Morse - avatar