CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Selector, Property, and Value.
In CSS, how do you select elements by their class attribute?
.classname {
}
In CSS, how do you select elements by their type?
nameofelement {
}
In CSS, how do you select an element by its id attribute?
nameofid {
}
Name three different types of values you can use to specify colors in CSS.
RGBA CSS Function, Hex Codes, and Color Names.
What CSS properties make up the box model?
Border, Padding, and Margin.
Which CSS property pushes boxes away from each other?
The Margin property pushes boxes away from each other.
Which CSS property add space between a box’s content and its border?
The Padding property adds space between a box’s content and its border.
What is a pseudo-class?
Pseudo-class is a keyword added to a selector that specifies a special state of the selected element.
What are CSS pseudo-classes useful for?
To apply CSS for a special state of the element that is implied by the browser.
Ex: :hover
:nth-child(odd)
Name at least two units of type size in CSS.
Pixels, Percentages, and Ems.
What CSS property controls the font used for the text inside an element?
The font-family property controls the font used for the text inside an element.
What is the default flex-direction of a flex container?
row is the default flex-direction of a flex container.
What is the default flex-wrap of a flex container?
nowrap is the default flex-wrap of a flex container.
Why do two «a>div</a>> elements “vertically stack” on one another by default?
Two «a>div</a>> elements “vertically stack” on one another because they are block-level elements by default.