Which of these CSS selectors does not target elements based on their HTML tag name?
h1
article
p
.container
✓
Correct Answer
.container
The shared property is targeting elements by their HTML tag name. 'p', 'h1', and 'article' are all type selectors that target elements based on their tag. '.container' is a class selector, which targets elements by their class attribute, not their tag name.
Question 2
Which of these CSS properties does not add space between an element's content and its border?
padding-left
padding-top
margin-bottom
✓
padding-right
Correct Answer
margin-bottom
The shared property is adding space between an element's content and its border (internal spacing). 'padding-top', 'padding-right', and 'padding-left' all contribute to padding. 'margin-bottom' adds space outside of an element's border, separating it from other elements.
Question 3
Which of these CSS properties is typically applied to a flex container, not a flex item?
justify-content
✓
align-self
order
flex-grow
Correct Answer
justify-content
The shared property is being a property typically applied to a flex item. 'order', 'flex-grow', and 'align-self' are all properties applied to individual flex items. 'justify-content' is a property applied to the flex container to align its items along the main axis.
Question 4
Which of these CSS properties is not primarily used for defining explicit grid track sizes?
grid-template-columns
grid-template-areas
grid-template-rows
grid-column-gap
✓
Correct Answer
grid-column-gap
The shared property is being primarily used for defining explicit grid track sizes or structure. 'grid-template-columns', 'grid-template-rows', and 'grid-template-areas' are all used to define the size and layout of explicit grid tracks. 'grid-column-gap' (or column-gap) specifies the size of the gap between grid columns, not the size of the tracks themselves.
Question 5
Which of these CSS selector types contributes the least to specificity?
ID selector
Class selector
Type selector
Universal selector
✓
Correct Answer
Universal selector
The shared property is contributing a positive, non-zero value to specificity. 'ID selector' (1000), 'Class selector' (100), and 'Type selector' (10) all have a specificity value greater than zero. The 'Universal selector' (*) contributes zero to specificity.
Question 6
Which of these CSS units is not a relative unit for creating fluid layouts?
vw
em
px
✓
rem
Correct Answer
px
The shared property is being a relative unit. 'em' (relative to parent font-size), 'rem' (relative to root font-size), and 'vw' (relative to viewport width) are all relative units. 'px' (pixels) is an absolute unit.
Question 7
Which of these display property values does not cause an element to take up the full width available and force a new line after it?
inline
✓
grid
block
flex
Correct Answer
inline
The shared property is causing the element to take up the full available width and force a new line. 'block', 'flex', and 'grid' all establish a new block formatting context, causing the element to take full width and new line. 'inline' elements only take up as much width as their content requires and do not force a new line.
Question 8
Which of these CSS Flexbox properties does not align items along the cross axis?
align-content
align-items
justify-content
✓
align-self
Correct Answer
justify-content
The shared property is being a Flexbox property used to align items along the cross axis. 'align-items', 'align-content', and 'align-self' all control alignment along the cross axis. 'justify-content' controls alignment along the main axis.
Question 9
Which of these CSS Grid properties is applied to the grid container, not a grid item?
grid-column
grid-template-columns
✓
grid-row
grid-area
Correct Answer
grid-template-columns
The shared property is being a CSS Grid property applied to a grid item. 'grid-column', 'grid-row', and 'grid-area' are all applied to individual grid items to position them. 'grid-template-columns' is applied to the grid container to define the columns of the grid.
Question 10
Which of these CSS selectors is not a pseudo-class?
:focus
::first-line
✓
:active
:hover
Correct Answer
::first-line
The shared property is being a pseudo-class. ':hover', ':focus', and ':active' are all pseudo-classes, which select elements based on their state. '::first-line' is a pseudo-element, which selects a specific part of an element.
Question 11
When box-sizing is set to border-box, which of these properties does not contribute to the element's explicit width and height?
margin
✓
padding
width
border
Correct Answer
margin
The shared property is contributing to the element's explicit width and height when box-sizing is border-box. 'width' (or height), 'padding', and 'border' are all included within the specified width/height of an element when box-sizing is border-box. 'margin' always adds space outside the element's total box, regardless of the box-sizing model.
Question 12
Which of these CSS properties is specific to the Grid layout module and not generally used in Flexbox or the standard box model?
grid-template-columns
flex-basis
✓
gap
display: grid
Correct Answer
flex-basis
The shared property is being a CSS property specific to the Grid layout module. 'display: grid', 'grid-template-columns', and 'gap' (when used in grid context) are fundamental to CSS Grid. 'flex-basis' is a property specific to the Flexbox layout module.
Question 13
Which of these CSS Flexbox properties is not directly associated with defining the axis or direction of the flex container?
justify-content
✓
flex-direction
flex-wrap
flex-flow
Correct Answer
justify-content
The shared property is being directly associated with defining the axis or direction of the flex container. 'flex-direction' sets the main axis, 'flex-flow' is a shorthand for flex-direction and flex-wrap, and 'flex-wrap' controls whether items wrap along the cross axis, which relates to the overall flow and direction. 'justify-content' is used to distribute space and align items along the main axis, but it does not define the axis itself.
Question 14
Three of these are class-, type- or attribute-level selectors. Which one is not?
Class selector
Attribute selector
ID selector
✓
Type selector
Correct Answer
ID selector
The shared property is contributing less than 1000 to specificity. 'Class selector' (100), 'Type selector' (10), and 'Attribute selector' (10) all have lower specificity values. 'ID selector' (1000) contributes the most to specificity among these options.
Question 15
Three of these combinators are not limited to direct children of the parent element. Which one is?
Adjacent sibling selector (+)
Child selector (>)
✓
Descendant selector (space)
General sibling selector (~)
Correct Answer
Child selector (>)
The shared property is being a CSS combinator that does not select only direct children. The 'Adjacent sibling selector (+)', 'General sibling selector (~)', and 'Descendant selector (space)' all select elements based on different relationships (siblings or any descendant) but not exclusively direct children. The 'Child selector (>)' specifically selects only direct children of a parent element.