What does <!DOCTYPE html> at the start of a page do?
-
A
It links the page to a JavaScript file
-
B
It loads the default CSS stylesheet
-
C
It enables HTML5 standards mode
Correct answer
-
D
It creates the page's main heading
Correct answer
C. It enables HTML5 standards mode
19 views
Explanation
The HTML5 doctype stops browsers from falling back to 'quirks mode', which mimics old, inconsistent rendering. It must be the very first line.
Reference
Asked in: NTS, PPSC, Web Developer Interviews
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ