GROW YOUR SKILLS Quiz: Web Design Fundamentals
Quiz: Advanced Web Design Challenge
Question 1: HTML5 Semantics
Which tag is used to define an independent, self-contained content?
- A) <article>
- B) <section>
- C) <div>
- D) <details>
- Answer: A) <article>
Question 2: CSS3 Properties
Which CSS property is used to create rounded corners?
- A) border-radius
- B) border-curve
- C) corner-round
- D) edge-curve
- Answer: A) border-radius
Question 3: JavaScript ES6
What does the const keyword represent?
- A) A block-scoped variable that can be reassigned
- B) A block-scoped, read-only named constant
- C) A globally scoped constant
- D) A variable that can hold constant objects only
- Answer: B) A block-scoped, read-only named constant
Question 4: Responsive Design
Which unit is most useful for creating designs that adapt to screen size?
- A) Pixels (px)
- B) Percentages (%)
- C) Em units (em)
- D) Viewport width (vw)
- Answer: D) Viewport width (vw)
Question 5: CSS Flexbox
To align flex items at the center of the container’s cross axis, which property is used?
- A) justify-content: center;
- B) align-items: center;
- C) align-content: center;
- D) justify-items: center;
- Answer: B) align-items: center;
Question 6: HTML Forms
For a form input field to be required, which attribute must be added?
- A) required=”true”
- B) needed
- C) mandatory
- D) required
- Answer: D) required
Question 7: JavaScript Arrays
How do you find the number of elements in an array named myArray?
- A) myArray.count
- B) myArray.length
- C) myArray.size()
- D) count(myArray)
- Answer: B) myArray.length
Question 8: CSS Selectors
Which selector targets every <p> element that is the first child of its parent?
- A) p:first-child
- B) p:first-of-type
- C) first:p
- D) p:first
- Answer: A) p:first-child
Question 9: HTML Linking
To link a CSS file named “style.css” in an HTML document, which line of code is correct?
- A) <link rel=”stylesheet” type=”text/css” href=”style.css”>
- B) <stylesheet src=”style.css”>
- C) <css link=”style.css”>
- D) <link style=”style.css”>
- Answer: A) <link rel=”stylesheet” type=”text/css” href=”style.css”>
Question 10: JavaScript Events
Which method is used to prevent the default action of an event?
- A) event.preventDefault()
- B) event.stop()
- C) event.stopPropagation()
- D) event.cancel()
- Answer: A) event.preventDefault()