CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector and declaration block
In CSS, how do you select elements by their class attribute?
by putting a . Infront of the name
In CSS, how do you select elements by their type?
put the name of the element
In CSS, how do you select an element by its id attribute?
put a # Infront of the name
Name three different types of values you can use to specify colors in CSS.
rbg, hex, and name
What CSS properties make up the box model?
border, padding and margin
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?
CSS pseudo-classes are used to add styles to selectors, but only when those selectors meet certain conditions.
What are CSS pseudo-classes useful for?
A pseudo-class is used to define a special state of an element. For example, it can be used to: Style an element when a user mouses over it. Style visited and unvisited links differently.
Name two types of units that can be used to adjust font-size in CSS.
px and em
What CSS property controls the font used for the text inside an element?
font-property
What is the default flex-direction of a flex container?
row
What is the default flex-wrap of a flex container?
nowrap
Why do two div elements “vertically stack” on one another by default?
they are designed to take up the entire width of the page so the next moves to the next line