Câu hỏi phỏng vấn HTML
Câu hỏi

What does a DOCTYPE do?

Câu trả lời

The DOCTYPE declaration in HTML serves as a critical instruction to the web browser, indicating the version of HTML that the document is written in. This declaration is essential because it helps the browser understand how to correctly parse and render the content of the webpage.

Primarily, the DOCTYPE declaration prevents the browser from entering a "quirks mode" when rendering the document. Quirks mode is a legacy rendering mode where the browser emulates non-standard behaviors present in older browsers that do not conform to modern web standards. By specifying a DOCTYPE, the document tells the browser to use "standards mode," which supports modern web standards and ensures that the page is rendered more consistently across different browsers[1].

The declaration is placed at the very top of an HTML document, before the <html> tag. In HTML5, the simplest and most commonly used DOCTYPE is <!DOCTYPE html>. Th...

middle

middle

Gợi ý câu hỏi phỏng vấn

senior

What kind of things must you be wary of when designing or developing for multilingual sites?

middle

How do you serve a page with content in multiple languages?

middle

Describe the difference between a 'cookie', 'sessionStorage' and 'localStorage'

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào