CSS Flashcards
What are the names of the individual pieces of a CSS rule?
class , id and type
In CSS, how do you select elements by their class attribute?
use dot then the class name
In CSS, how do you select elements by their type?
by using the element name
In CSS, how do you select an element by its id attribute?
#
Name three different types of values you can use to specify colors in CSS.
hexadecimal, rgba and rgb
What CSS properties make up the box model?
border, margin , padding and content itself
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?
selector that selects elements that are in a specific state
What are CSS pseudo-classes useful for?
its useful by allowing elements to respond to user interactions
Name two types of units that can be used to adjust font-size in CSS.
pixel and rem
What CSS property controls the font used for the text inside an element?
font-family
What are the four components of “the Cascade”.
Source order. inheritance. Specificity. Importance.
What does the term “source order” mean with respect to CSS?
it means in which order the code is being read top to bottom
How is it possible for the styles of an element to be applied to its children as well without an additional CSS rule?
inheritance