CSS Flashcards
Name three different types of values you can use to specify colors in CSS.
RGB, Hexidecimal, Color name
What 5 CSS properties make up the box model?
Margin, Padding, Width, Height, Border
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 are the names of the individual pieces of a CSS rule?
Selector and a declaration
In CSS, how do you select elements by their class attribute?
by using a period ( . )
In CSS, how do you select elements by their type?
By typing the matching element name.
In CSS, how do you select an element by its id attribute?
By using a ( # ) symbol.
What is a pseudo-class?
a keyword added to a selector that specifies a special state of the selected element(s).
What are CSS pseudo-classes useful for?
pseudo-classes allow us to apply styling based on user interaction or the structure of the HTML document
Name two types of units that can be used to adjust font-size in CSS.
pixels, 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
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