CSS Flashcards
[CSS Syntax]
What are the names of the individual pieces of a CSS rule?
selector {declaration block}
property: value;
[CSS Syntax]
In CSS, how do you select elements by theirclassattribute?
a period before the element
.element
[CSS Syntax]
In CSS, how do you select elements by their type?
element name
[CSS Syntax]
In CSS, how do you select an element by itsidattribute?
poundsign / hashtag element name
#element
[CSS Colocs]
Name three different types of values you can use to specify colors in CSS.
Hex value, RGBA values, color name
[CSS Box Model]
What CSS properties make up the box model?
margin, border, padding, content/element
[CSS Box Model]
Which CSS property pushes boxes away from each other?
Margin
[CSS Box Model]
Which CSS property add space between a box’s content and its border?
Padding
[CSS Pseudo Classes]
What is a pseudo-class?
A class applied by the browser for special states or html structure
[CSS Pseudo Classes]
What are CSS pseudo-classes useful for?
For simplifying CSS and styling elements in relation to how they are interacted with
[CSS Fonts]
Name two types of units that can be used to adjustfont-sizein CSS.
px, em, rem, %
[CSS Fonts]
What CSS property controls the font used for the text inside an element?
font-family
Is a div a block-level element or inline?
Block-level element
[CSS Flexbox]
What is the default flex-direction of a flex container?
row (left to right)
[CSS Flexbox]
What is the default flex-wrap of a flex container?
no wrap (all flex items on one line)