CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector; declaration with a property and value
In CSS, how do you select elements by their class attribute?
.classname
In CSS, how do you select elements by their type?
match element name
In CSS, how do you select an element by its id attribute?
idname
Three different types of values used to specify colors in CSS
RBG values, hex codes, color names
What CSS properties make up the box model?
border, margin, padding, height, width
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 class applied by a browser that specifies a special state of the selected element
What are pseudo classes useful for?
applying style to an element in relation to external factors or events made by the user
Two types of units that can be used to adjust font-size in CSS
px, rem
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 are on one line)
Why do two div elements “vertically stack” on one another by default?
div elements are block elements