Web Designing Practice Test: 20 Multiple Choice Questions with Answers and Explanations

Web Designing 40 min min read Updated: Nov 18, 2026 Intermediate
Web Designing Practice Test: 20 Multiple Choice Questions with Answers and Explanations
Intermediate Topic 2 of 3

Try each question first, then read the answer. Score yourself at the end.

Q1. Which tag holds the main unique content of a page?

  • A) section
  • B) main
  • C) aside
  • D) div

Answer: B. main marks the primary content, and there should be only one visible per page.

Q2. Which part of the box model sits between the border and the content?

  • A) Margin
  • B) Outline
  • C) Padding
  • D) Gap

Answer: C. Padding is the space inside the border around the content.

Q3. Which selector has the highest specificity?

  • A) p
  • B) .note
  • C) #note
  • D) p.note

Answer: C. An id selector beats class and element selectors.

Q4. What does box-sizing: border-box change?

  • A) Border color
  • B) Width includes padding and border
  • C) Margin collapse
  • D) Display type

Answer: B. Padding and border are counted inside the set width.

Q5. Which property turns an element into a flex container?

  • A) position: flex
  • B) display: flex
  • C) flex: container
  • D) float: flex

Answer: B. display: flex starts Flexbox layout.

Q6. Which value gives a card grid that fits as many columns as possible?

  • A) repeat(auto-fit, minmax(15rem, 1fr))
  • B) repeat(3, 10px)
  • C) auto auto
  • D) flex-wrap

Answer: A. auto-fit with minmax makes columns that adapt to the width.

Q7. What is the job of the viewport meta tag?

  • A) Add keywords
  • B) Make mobile browsers use the device width
  • C) Load fonts
  • D) Set the page title

Answer: B. Without it, phones show a shrunken desktop layout.

Q8. In mobile first CSS, which media query is typical?

  • A) max-width: 300px
  • B) min-width: 700px
  • C) orientation: none
  • D) print only

Answer: B. You start small and add styles as the screen gets wider.

Q9. Which unit is relative to the root font size?

  • A) px
  • B) em
  • C) rem
  • D) pt

Answer: C. rem uses the html element's font size.

Q10. Which animation properties are best for smooth performance?

  • A) width and height
  • B) transform and opacity
  • C) top and left
  • D) margin and padding

Answer: B. They avoid costly layout recalculation.

Q11. What is the minimum WCAG AA contrast for normal text?

  • A) 2 to 1
  • B) 3 to 1
  • C) 4.5 to 1
  • D) 10 to 1

Answer: C. Normal text needs 4.5 to 1. Large text needs 3 to 1.

Q12. When should an image have an empty alt?

  • A) Never
  • B) When it is purely decorative
  • C) When it is large
  • D) When it is a logo link

Answer: B. An empty alt tells screen readers to skip decoration.

Q13. What does aria-expanded communicate?

  • A) Color
  • B) If a control has opened its content
  • C) Font size
  • D) Link target

Answer: B. It tells assistive tools if a menu or accordion is open.

Q14. Which is the best element for a clickable action?

  • A) div with onclick
  • B) span
  • C) button
  • D) p

Answer: C. A button works with keyboard and screen readers by default.

Q15. What does a design token store?

  • A) A password
  • B) A reusable design value such as a color or spacing
  • C) A server address
  • D) A user session

Answer: B. Tokens keep design values consistent.

Q16. Which method is a CSS naming convention?

  • A) BEM
  • B) JSON
  • C) SQL
  • D) CRUD

Answer: A. BEM means block, element, modifier.

Q17. Which metric measures unexpected movement of page content?

  • A) LCP
  • B) INP
  • C) CLS
  • D) TTFB

Answer: C. Cumulative Layout Shift measures visual stability.

Q18. What is a wireframe?

  • A) A finished design
  • B) A low detail layout sketch
  • C) A database
  • D) A color palette

Answer: B. It shows structure before visual styling.

Q19. Which Git command saves your staged changes?

  • A) git push
  • B) git commit
  • C) git clone
  • D) git pull

Answer: B. Commit records a snapshot. Push sends commits to the remote.

Q20. Which is the best way to find if a new CSS feature works in browsers?

  • A) Guess
  • B) Check MDN or Can I Use
  • C) Ask a friend only
  • D) Assume all support it

Answer: B. Support tables show real browser data.

Score

ScoreMeaning
18 to 20Strong. Start building projects
14 to 17Good. Revise the missed topics
Below 14Revisit lessons on HTML, CSS and layout

Conclusion

Revise the lessons for any questions you missed, then try the labs again.

Quick Summary: 20 MCQs with answers and a scoring guide.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators