(CSS) Question and answers already
passed 2025
element[attribute$=value] - correct answer Which selector targets every
instance of a specified HTML element whose specified attribute ends with the
specified value?
element[attribute*=value] - correct answer Which selector targets every
instance of a specified HTML element whose specified attribute contains the
specified substring value?
element[attribute^=value] - correct answer Which selector targets every
instance of a specified HTML element whose specified attribute begins with
the specified value?
element:checked - correct answer Which selector targets every checked
instance of a specified HTML element?
element:disabled - correct answer Which selector targets every disabled
instance of a specified HTML element?
element:enabled - correct answer Which selector targets every enabled
instance of a specified HTML element?
element:first-of-type - correct answer Which selector targets every instance of
a specified HTML element that is the first of its parent?
,element:last-of-type - correct answer Which selector targets every instance of
a specified HTML element that is the last of its parent?
element1~element2 - correct answer Which selector targets every instance of
element2 that is preceded by an instance of element1?
background
Properties are in this order:
background: bg-color bg-image position/bg-size bg-repeat bg-origin bg-clip
bg-attachment initial|inherit; - correct answer Which property allows you to set
different background properties in one declaration?
background-clip
Key values for this property:
border-box - extends behind the border
padding-box - extends to the inside edge of the border
content-box - extends to the edge of the content box - correct answer Which
property specifies whether the background extends into the border or not?
background-origin
Key values for this property:
padding-box - from the upper left corner of the padding edge
border-box - from the upper left corner of the border
, content-box - from the upper left corner of the content - correct answer Which
property positions the background-image relative to an element's border,
padding or content?
background-size
Key values for this property:
length - specifies width and height in fixed units
percentage - specifies width and height in in relation to the parent element
cover - cover the entire container, even if it has to stretch the image or cut a
little bit off one of the edges
contain - resize the background image to make sure the image is fully visible -
correct answer Which property defines the size of background images?
border-image - correct answer Which property creates a border that uses an
image instead of a line?
border-radius - correct answer Which property defines the shape or curve of
a border around an HTML element?
box-shadow - correct answer Which property applies shadows to edges of
HTML elements to create visual depth?
h-shadow and v-shadow - correct answer Which two values are required to
create a box-shadow?
opacity - correct answer Which property specifies transparency for an HTML
element?