CSS Flashcards
what are the names of the individual pieces of a CSS rule?
Selector, declaration, property, and value
In CSS, how do you select elements by their class attribute?
.class { }
in CSS, how do you select elements by their type
typename { }
in CSS, how do you select an element by its id attribute
id { }
name three different types of values you can use to specify colors in CSS
RGB values, Hex codes, Color Names
What CSS properties make up the box model?
PBM - padding, border, margin
which CSS property pushes boxes away from each other
margin
which CSS property adds space between a box’s content and its border
padding
what is a pseud-class?
keyword added to a selector that specifies a special state of the selected element(s)
what are CSS pseudo-classes useful for?
special situations (nth-child)
name at least two units of type size in CSS
em (relative to the font-size of direct or nearest parent) , rem (only relative to the html root font-size)
what CSS property controls the font used for the text inside an element?
font-family
what is the default flex-direction of a flex container?
row (left to right)
what is the default flex-wrap of a flex container?
nowrap (all flex items will be on one line)
why do two div elements “vertically stack” on one another by default?
div is block element and will appear on new line