CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector (selector group)and declaration block
In CSS, how do you select elements by their class attribute?
a dot follow by the value of the class attribute
In CSS, how do you select elements by their type?
just type the element name
In CSS, how do you select an element by its id attribute?
a # pound sign followed by the value of the id attribute
Name three different types of values you can use to specify colors in CSS.
Color names, RGB values, and Hex codes. (also HSL functional notation)
What is a pseudo-class?
A CSS pseudo-class is a keyword added to a selector which allows you to apply a style or functionality to the element when a user interacts with it.
What are CSS pseudo-classes useful for?
Links, buttons, form controls.
What CSS properties make up the box model?
Margin, border and 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.
Name at least two units of type size in CSS.
Pixels, % percentages, ems.
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 (all flex items will be on one line)
Why do two div elements “vertically stack” on one another by default?
Because div elements are block level element.