CSS Flashcards
What are the names of the individual pieces of a CSS rule?
The selector, the declaration block, property value pairs
In CSS, how do you select elements by their class attribute?
You use “.” followed by the elements with that class attribute
In CSS, how do you select elements by their type?
You use the name of the element
In CSS, how do you select an element by its id attribute?
You us “#” followed by elements with that id attribute
Name three different types of values you can use to specify colors in CSS
Using one of the 147 predefined colors, rgba, and hexadecimal color values
what CSS properties make up the box model?
Border, margin, padding
Which CSS property pushes boxes away from each other?
Margin
Which CSS property adds space between a box’s content and its border?
Padding
What is a pseudo-class?
Adds some kind of functionality to a selector
What are CSS pseudo-classes used for?
They allow you to change the style of elements when you interact with them
Name two types of units that can be used to adjust font-size in CSS
Px, rem, %
What CSS property controls the font used for the text inside an element?
font-family
What are the four components of “the cascade”
Importance, Specificity, Source Order, Inheritance
What does the term “source order” mean with respect to CSS?
The order that the CSS rules be applied
How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?
Because of inheritance, some styles of an element will be adopted by its child element