CSS Interview Prep
Prepare for your frontend developer interview with these common CSS questions.
CSS Interview Preparation
Get ready for your next job interview with these common CSS interview questions and answers.
Common Questions
1. What is the Box Model?
The CSS Box Model is a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content.
2. What is the difference between class and ID selectors?
An ID is unique to a page and can only be used once, while a class can be used on multiple elements.
3. Explain CSS Specificity.
Specificity determines which CSS rule is applied by the browser. ID selectors have higher specificity than class selectors, which have higher specificity than element selectors.
4. What is Flexbox?
Flexbox is a one-dimensional layout method for laying out items in rows or columns.