CSS (Cascading Style Sheets) Flashcards
What are the names of the individual pieces of a CSS rule?
Selector, Declaration Block, Declaration (which contain property and value)
In CSS, how do you select elements by their class attribute?
.
In CSS, how do you select elements by their type?
the name
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.
rgb values, hex code, and color name (most common 3)
What CSS properties make up the box model?
Padding, Border, Margin
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?
Classes applied by browser under certain circumstances
What are CSS pseudo-classes useful for?
Applied styling as a result of user interaction
Name at least two units of type size in CSS.
rem, px, %, pt
What is the default flex-direction of a flex container?
row - left to right
What is the default flex-wrap of a flex container?
nowrap
Why do two div elements “vertically stack” on one another by default?
They are block elements
What is the default flex-direction of an element with display: flex?
row - left to right