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>,

26th Mar 2018, 11:07 AM
Labaika Temitope
Labaika Temitope - avatar
2 Antworten
+ 5
it’s the only tag that can’t have attributes
26th Mar 2018, 11:10 AM
Toni Isotalo
Toni Isotalo - avatar
+ 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
26th Mar 2018, 2:06 PM
visph
visph - avatar