Front End Web Developer Exam
Question 1. What does the <!DOCTYPE html> declaration do in an HTML document?
A) Declares the CSS version
B) Declares the JavaScript version
C) Defines the document type and HTML version
D) Adds accessibility features
Answer: C
Explanation: The <!DOCTYPE html> declaration tells the browser which version of HTML is being used
(HTML5 in this case) and ensures that the document is rendered in standards-compliant mode.
Question 2. Which HTML element should be used to wrap a navigation menu?
A) <footer>
B) <section>
C) <nav>
D) <aside>
Answer: C
Explanation: The <nav> element is specifically designed to wrap navigation links or menus, improving
semantic meaning and accessibility.
Question 3. What is the purpose of the <label> element in HTML forms?
A) To create a placeholder
B) To display read-only values
C) To define a caption for a form control
D) To submit form data
Answer: C
Explanation: <label> associates a text description with a specific form control, enhancing accessibility
and usability.
Question 4. Which HTML element is used to embed an image?
A) <picture>
B) <img>