CSS Flashcards
What are the names of the individual pieces of a CSS rule-set?
Declaration block
Selector
Property:value pairs
In CSS, how do you select elements by their class attribute?
.class
In CSS, how do you select an element by its ID attribute?
idname
Name 3 different type values you can use to specify colors in CSS:
rgb
rgba
hex
hsl
What CSS properties make up the box model?
height width padding border margin
Which CSS property pushes boxes away from each other?
margin
What CSS property adds space between the content of a box and its border?
padding
What is a pseudo class?
A keyword added to a selector that specifies a specific state of the selected element(s).
What are CSS pseudo classes useful for?
They allow developers to style elements when the user is interacting with the elements differently than when the user is not interacting with them.
What is a fall back value?
With font-family we use a fall back value along with the value in case the browser doesn’t have the first value available.
Name two types of units that can be used to adjust font-size in CSS?
px
em
what css property controls the font used for the text inside an element?
font-family
What is the default flex-direction of the flex container?
row
what is the default flex-wrap of the flex container?
nowrap
Why do two div elements vertically stack on one another by default?
Div elements are block-level elements
What is the default flex direction of an element with display:flex?
row
What is the default value for the position property of html elements?
Normal flow