CSS day 1 Flashcards
What are the names of the individual pieces of a CSS rule?
CSS selector, declaration blocks, declarations, property, value
In CSS, how do you select elements by their class attribute?
.element
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?
element
Name three different types of values you can use to specify colors in CSS.
hexcode, name of color, rgb values.
What CSS properties make up the box model?
margins, borders, padding, and the actual 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 CSS pseudo-class is a keyword added to a selector that specifies a special state of the selected element(s).
What are CSS pseudo-classes useful for?
to add styling based on state.
Name at least two units of type size in CSS.
em, % percentages, px
What CSS property controls the font used for the text inside an element?
font-family