CSS Flashcards
What are the names of the individual pieces of a CSS rule?
rule set, selector, property, value
In CSS, how do you select elements by their class attribute?
.
In CSS, how do you select elements by their type?
write the name of the element
In CSS, how do you select an element by its id attribute?
#
Name three different types of values you can use to specify colors in CSS.
the name RGB and hexcodes.
What CSS properties make up the box model?
margin, border, padding, content
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 pseudo class is expressed by adding a colon (:) after a selector in CSS, followed by a pseudo-class such as “hover”, “focus”, or “active
What are CSS pseudo-classes useful for?
CSS pseudo-classes are used to add styles to selectors, but only when those selectors meet certain conditions
what is :nth-child()
The :nth-child() CSS pseudo-class matches elements based on their position in a group of siblings.
Name at least two units of type size in CSS.
percentage, 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?
nowrap