CSS Flashcards
What are the names of the individual pieces of a CSS Rule?
selector, declaration, property, value
In CSS, how do you select elements by their class attribute?
.nameofelement {}
In CSS, how do you select elements by their type?
h1, h2, h3 {} (matches element names)
In CSS, how do you select an element by its id attribute?
nameofidattribute{}
Name three different types of values you can use to specify colors in CSS.
name colors, rgb, hexcode
What CSS properties make up the box model?
border, margin, padding
What 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?
When a keyword is added, selected elements will show a special state
What are CSS pseudo-classes useful for?
lets you apply a style to an element as a result of user interaction/action
Name at least two units of type size in CSS
rem, px
What CSS property controls the font size used for the text inside an element?
font-size
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?
because they’re block elements