CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector, declaration block, property value
In CSS, how do you select elements by their class attribute?
. class name
In CSS, how do you select elements by their type?
selector followed by declaration bracket
In CSS, how do you select an element by its id attribute?
followed by ID of the element
What CSS properties make up the box model
padding, border, margin
Which CSS property pushes boxes away from each other?
Margin
What CSS properties make up the box model?
padding, margin, border
Which CSS property add space between a box’s content and its border?
padding
what are CSS pseudo classes useful for
event based styling
what is a pseudo class
class that selects specific elements in a specific state
Name at least two units of type size in CSS
pixels or rem
What CSS property controls the font used for the text inside an element?
Why do two div elements “vertically stack” on one another by default?
Because they’re block level
What is the default flex-direction of an element with display: flex?
Row
What is the default value for the position property of the HTML elements?
static