CSS Flashcards
What are the names of the individual pieces of a CSS rule?
CSS rule consist of a selector and a declaration block
In CSS, how do you select elements by their class attribute?
With .class name
In CSS, how do you select elements by their type?
You write the name of the element as the selector
In CSS, how do you select an element by its id attribute?
With #id name
Name three different types of values you can use to specify colors in CSS.
RGB values, HEX codes, color names
What CSS properties make up the box model?
Border, margin, padding
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 pseudo-class is keywords that are added to a selector that specifies a special state of the selected elements
What are CSS pseudo-classes useful for?
They are useful in applying style to an element without having to additional classes
Name at least two units of type size in CSS
pixels, percentage, ems
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 - horizontal
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 - Normal Flow
How does setting position: relative on an element affect document flow?
You can shift element without affecting surrounding text and document flow