CSS Flashcards
What are the names of the individual pieces of a CSS rule?
A CSS rule consists of a selector and a declaration block.
In CSS, how do you select elements by their class attribute?
by period (.)
In CSS, how do you select elements by their type?
ID Selectors are used by adding # in front of an elements ID. Class Selectors are used by adding a period in front of an elements class.
In CSS, how do you select an element by its id attribute?
by hashtag(#)
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?
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 pseudo-class is a selector that selects elements that are in a specific state
What are CSS pseudo-classes useful for?
A pseudo-class is used to define a special state of an element
Name two types of units that can be used to adjust font-size in CSS.
pixels, em units, and rem units
What CSS property controls the font used for the text inside an element?
font-family
What does the transform property do?
It modifies the coordinate space of the CSS
Give four examples of CSS transform functions
translate, scale, rotate, skew