CSS Flashcards
What are the names of the individual pieces of a CSS rule?
CSS Selector, Declaration Block, Key:Value Pairs which are separated by a colon. Key:Value pairs end with a semicolon
In CSS, how do you select elements by their class attribute?
Using a period (.) before the class attribute value as a CSS Selector
In CSS, how do you select elements by their type?
Using the tag of the element as a CSS Selector
In CSS, how do you select an element by its id attribute?
Using a pound symbol (#) before the id attribute value as a CSS Selector
Name three different types of values you can use to specify colors in CSS.
Name, Hexcode, RGB, RGBA
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?
pseudo-class is 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 let you apply a style to an element in relation to external factors
Name two types of units that can be used to adjust font-size in CSS.
Px, rem, em, 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?
Horizontal or Row
What is the default flex-wrap of a flex container?
no-wrap
The flexbox items will remain on a single line, no matter what, and will eventually overflow if needed
Why do two div elements “vertically stack” on one another by default?
divs are block elements