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{}
elements.class{}
In CSS, how do you select elements by their tag name?
tag{}
In CSS, how do you select an element by its id attribute?
id{}
What CSS properties make up the box model?
border
margin
padding
content
Which CSS property pushes boxes away from each other?
Margin
Which CSS property add space between a box’s content and its border?
Padding
What is a pseudo-class?
A keyword added to a selector that specifies a special state of the selected element
What are CSS pseudo-classes useful for?
They allow to change the appearance when a user is interacting with them
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?
Horizontal
What is the default flex-wrap of a flex container?
No-Wrap
What are all of justify-content values?
flex-start (items align to left)
flex-end (items align to right)
center (items align to center)
space-between (items have equal spacing)
space-around (items have spacing around them)
space-evenly (container and items spaced evenly)
Why do two div elements “vertically stack” on one another by default?
Because they are block level elements
What is the default flex-direction of an element with display: flex?
Horizontal
What are the three primary components of a page layout? (Which helper classes do you need?)
Row
Column
Container