CSS Flashcards
Names of the CSS rule pieces:
- Selector
- Opening/ closing braces
- Properties
- Property values
How do you select elements by their class attribute?
You place a .class in the selector
How do you select elements by type
you place the element type in the selector position
how do you select an element by it’s ID?
Use #idName
Name three types of values to specify colors:
hex numbers, rgba, and specific color names
What CSS properties make up the box model?
Margin, borders, padding, content size. width height
Which CSS property pushes boxes away from each other?
margin.
Which CSS property adds space between a box’s content and it’s border?
padding.
What is a psuedo-class?
A psuedo-class is a keyword added to a selector that specifies a special state of the selected element.
psuedo-class used for?
It’s helpful for making elements on your page respond to interaction
Name two units of font size:
em, rem, px.
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?
no-wrap
Why do two div elements “vertically stack” on one another by default?
div elements are block elements that do not share lines