CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Selector and Declaration block
Property and value
In CSS, how do you select elements by their class attribute?
Using a . followed by name of the class
In CSS, how do you select elements by their tag name?
Writing out the name of the element
In CSS, how do you select an element by its id attribute?
Using a # followed by the name of the id
What CSS properties make up the box model?
Border, Margin, Padding
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(s).
Just a class.
What are CSS pseudo-classes useful for?
Lets you apply a style of element in relation to the content as well as external factors
We use it because it’s easier to adjust and modify the code
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?
nowrap
Why do two div elements “vertically stack” on one another by default?
They are blocks by default
What is the default flex-direction of an element with display: flex?
Row
What are the three primary components of a page layout? (Which helper classes do you need?)
Container, Row, Columns