0

The beginning of HTML structure

I have seen alot of HTML structure starting..lemme explain: At first we type <!DOCTYPE> right? Some html programs have <!DOCTYPE HTML> or <!DOCTYPE> or nothing at all just starting straight with <html> Sooo can someone help me to understand wats going on?

21st Feb 2021, 4:12 PM
Martin Maged
Martin Maged - avatar
4 Réponses
+ 1
The doctype html tag is for saying the compiler/browser wich version of html we use (used for the declaration of html5). Like doctype I think, as far I know, is not a tag, it's a nonsense tag or only an error of this declaration. Html tag is the root tag of any Html document. It defines the whole document. It's always present in a html document. Hope it helps :)
21st Feb 2021, 4:16 PM
Matthew
Matthew - avatar
21st Feb 2021, 4:18 PM
Matthew
Matthew - avatar
+ 1
Major doctype is a special tag, wich is not an element. html is the root tag element, but not the only childnode of document...
21st Feb 2021, 4:18 PM
visph
visph - avatar
0
don't worry about oldest doctypes, just remember that html5 should start with <!DOCTYPE html> ;)
21st Feb 2021, 4:15 PM
visph
visph - avatar