0
Does HTML5 Doctype Declaration have any attribute, attribute name/value that can be added to it when writing a code??
html doctype declaration <!doctype html>,
2 Answers
+ 5
itâs the only tag that canât have attributes
+ 3
Attributes are concept linked to html element, and <!doctype ...> is not an html element, but a document type declaration used by browser to know wich version of html specification to follow while parsing/interpreting source code...
Html5 have a short <!doctype html> declaration form, while previous (outdated) versions had longest and harder to remember, with explicit reference to the corresponding DTD (Document Type Definition). Without a doctype, browsers turn into a "quirks" mode instead of standards:
https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode