CSS Flashcards
What are the names of the individual pieces of a CSS rule?
declaration block, selector, properties, values
In CSS, how do you select elements by their class attribute?
.attribute { (putting a period before the name of the class)
In CSS, how do you select elements by their tag name?
type { (type element name)
In CSS, how do you select an element by its id attribute?
id { (type # with id)
Name three different types of values you can use to specify colors in CSS.
RGB Values
Hex Codes
Color Names
What CSS properties make up the box model?
Border, Margin, Padding, Width, Height
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?
class added to a selector that specifies a special state (ex: hover)
What are CSS pseudo-classes useful for?
Let you apply a style to an element for events of users interacting with elements
Name two types of units that can be used to adjust font-size in CSS.
px, rem, em
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 :left to right
What is the default flex-wrap of a flex container?
no wrap
What is align items in flexbox
top to bottom alignment