CSS 1 Flashcards
What are the names of the individual pieces of a CSS rule?
selector and declaration block with property name: value
In CSS, how do you select elements by their class attribute?
. dot followed by class name
In CSS, how do you select elements by their type?
name of the element
In CSS, how do you select an element by its id attribute?
# hashtag followed by id name
Name three different types of values you can use to specify colors in CSS.
color keywords “black”, RGB color values “rgb(0, 0, 0)”, Hexadecimal color values “#000000”
What CSS properties make up the box model?
content, padding, border, margin
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?
a selector, choosing only elements in a special state, such as “:hover” or “:first-child”
What are CSS pseudo-classes useful for?
They allow you to apply a style to an element in relation to external factors, such as if the mouse is over an element or target the first child element
What CSS property controls the font used for the text inside an element?
font-family
What is the default flex-direction of a flex container?
row (from left to right)
What is the default flex-wrap of a flex container?
nowrap
Why do two < div > elements “vertically stack” on one another by default?
< div > elements are block-level
What is the default flex-direction of an element with display: flex?
row (from left to right)