nerdexam
CIW

1D0-720 · Question #40

What is the primary function of the HTML5 <!DOCTYPE html> declaration?

The correct answer is B. It instructs the browser to render the page in HTML5 mode. <!DOCTYPE html> is a document type declaration that tells the browser to render the page using the HTML5 standard, triggering "standards mode" instead of the older "quirks mode" - this is exactly what option B describes. Option A is wrong because CSS is linked via <link> tags…

Web Development Best Practices

Question

What is the primary function of the HTML5 <!DOCTYPE html> declaration?

Options

  • AIt links the HTML page to CSS stylesheets.
  • BIt instructs the browser to render the page in HTML5 mode.
  • CIt includes JavaScript files in the webpage.
  • DIt is used to define the character encoding of the webpage.

How the community answered

(19 responses)
  • A
    5% (1)
  • B
    84% (16)
  • D
    11% (2)

Explanation

<!DOCTYPE html> is a document type declaration that tells the browser to render the page using the HTML5 standard, triggering "standards mode" instead of the older "quirks mode" - this is exactly what option B describes. Option A is wrong because CSS is linked via <link> tags or <style> blocks, not DOCTYPE. Option C is wrong because JavaScript is included with <script> tags. Option D is wrong because character encoding is declared with <meta charset="UTF-8"> inside the <head>.

Memory tip: Think of DOCTYPE as a document identity card - it tells the browser what kind of document it's dealing with before anything else is processed. No style, no scripts, just a rendering instruction.

Topics

#DOCTYPE declaration#HTML5#browser rendering mode#document type definition

Community Discussion

No community discussion yet for this question.

Full 1D0-720 Practice