css Flashcards
What are the names of the individual pieces of a CSS rule?
declaration block, properties, selector.
In CSS, how do you select elements by their class attribute?
.
In CSS, how do you select elements by their type?
their tags
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.
RGB values, Hex Codes, named colors.
What CSS properties make up the box model?
margin padding border
Which CSS property pushes boxes away from each other?
margin
Which CSS property add space between a box’s content and it’s border?
padding
What is a pseudo class?
A pseudo class is a keyword that specifies a special state of an element.
What are pseudo-classes useful for?
They are useful for applying styling to elements when certain conditions are met, for example, hovering over a button.
Name at least two units of type size in CSS
px, rem
What CSS property controls the font used for text inside the element?
font-family
Why do two div elements “vertically stack” on one another by default?
Because they are block elements.
What is the default flex-direction of an element with display: flex?
row
What is the default value for the position property of HTML elements?
static