CSS Flashcards
What are the names of the individual pieces of a CSS rule?
rule set –> selector { property : value; }
In CSS, how do you select elements by their class attribute?
.selector
In CSS, how do you select elements by their type?
selector
In CSS, how do you select an element by its id attribute?
selector
Name three different types of values you can use to specify colors in CSS.
rgb() hsl() hex
What CSS properties make up the box model?
margin border padding height width
what does height and width affect for border proeprties
content
Which CSS property pushes boxes away from each other?
Which CSS property add space between a box’s content and its border?
Margin, padding
What is a pseudo-class?
keyword added to a selector that specifies a special state of the selected element(s) … hover… active… focus..
selector: pseudo-class { declaration block }
What are CSS pseudo-classes useful for?
let you apply a style to an element with relation to external factors like interaction
Name two types of units that can be used to adjust font-size in CSS.
px em %
What is the default flex-direction of a flex container?
row (left to right)
What is the default flex-wrap of a flex container?
Wrap
flexbox components
container and items inside
Why do two div elements “vertically stack” on one another by default?
because divs are block elements and take up a whole width and creates new lines in terms of document flow