LFZ CSS Quiz Flashcards
What are the names of the individual pieces of a CSS rule?
Declarations
In CSS, how do you select elements by their class attribute?
.(name of class)
In CSS, how do you select elements by their type?
(name of element)
In CSS, how do you select an element by its id attribute?
(name of id)
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 selector that specifies a special state of the selected element(s)
What are CSS pseudo-classes useful for?
Styling elements based on states or intractability
Name at least two units of type size in CSS.
em, pt, px, percent
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
What is the default value for the position property of HTML elements?
Static
How does setting position: relative on an element affect document flow?
once the positioned element has taken its place in the normal flow, you can then modify its final position