CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Rule set, selector, declaration/declaration block, property, value.
In CSS, how do you select elements by their class attribute?
With a dot/period ( . )
In CSS, how do you select elements by their tag name?
With the tag/element name.
In CSS, how do you select an element by its id attribute?
With the #.
Name three different types of values you can use to specify colors in CSS.
Hexidecimal, rgba, hsla.
What CSS properties make up the box model?
Height, width, padding, border, margin.
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 keyword added to a selector that specifies a special state of the selected element(s).
What are CSS pseudo-classes useful for?
Giving additional information, additional functionality, and applying styles.
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?
Default flex-direction is row.
What is the default flex-wrap of a flex container?
Default flex-wrap is nowrap.
What does justify content do?
This defines the alignment along the main axis. It helps distribute extra free space leftover when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size. It also exerts some control over the alignment of items when they overflow the line.