Html tags | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Html tags

Why do I see codes with <!DOCTYPE html> <html></html>? How do they have 2 opening html tags? In quizzes it was stated that tags like these can't work, yet their codes still execute just fine on the code playground. How?

5th Jun 2018, 11:40 AM
Andre Daniel
Andre Daniel - avatar
3 Answers
+ 6
when you are using HTML5 elements there must be these : <DOCTYPE html>, this is not opening tag, it is DOCTYPE declaration for HTML5. and then <html></html> are main tags. edit : those codes are totally perfect.
5th Jun 2018, 11:49 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 4
happy to help you. Andre Daniel
5th Jun 2018, 11:54 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
Ohh html5. Thank you.
5th Jun 2018, 11:50 AM
Andre Daniel
Andre Daniel - avatar