css Flashcards
What are the names of the individual pieces of a CSS rule?
css selector and declaration / property and value
In CSS, how do you select elements by their class attribute?
with a . followed by class name
In CSS, how do you select elements by their type?
by simply typing the type name followed by the declaration
In CSS, how do you select an element by its id attribute?
with a # followed by ID name
Name three different types of values you can use to specify colors in CSS.
Hex code, RDB, and color name
What CSS properties make up the box model?
border, margin, padding
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 pseudo-class?
a keyword that defines a special state of an element such as hover and focus
What are CSS pseudo-classes useful for?
changing the style of an element under a certain condition. EX: when mouse hovers button, change background to a different color.
Name at least two units of type size in CSS.
pixels, rem, em, and percentages
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
What is the default flex-wrap of a flex container?
no-wrap
Why do two div elements “vertically stack” on one another by default?
because they are block level elements.