Which part of the CSS box model is responsible for the space between the content and the border?
Think about the space inside the box but outside the text or image.
Padding is the space inside the element, between the content and the border.
Given the following CSS rules, which color will the <p> element have?
p { color: blue; }
#main p { color: red; }
.content p { color: green; }Remember that IDs have higher specificity than classes and element selectors.
The selector with the ID (#main p) has higher specificity than the class (.content p) and element (p) selectors, so the paragraph will be red.
Which statement best describes the main difference between CSS Flexbox and CSS Grid?
Think about layout directions and dimensions.
Flexbox arranges items in a single row or column (one dimension), while Grid arranges items in rows and columns (two dimensions).
What color will the <span> text be in this HTML and CSS?
<style>
body { color: black; }
div { color: blue; }
span { color: inherit; }
</style>
<body>
<div>
<span>Hello</span>
</div>
</body>Consider what 'inherit' means in CSS.
The <span> inherits the color from its parent <div>, which is blue.
Which CSS practice can cause accessibility problems for users with visual impairments?
Think about users who cannot distinguish colors well.
Relying only on color to convey information can make content inaccessible to colorblind users or those with low vision.