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 theirclassattribute?
Period, class name
In CSS, how do you select elements by their type?
Element name
In CSS, how do you select an element by itsidattribute?
Hashtag, class name
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?
Width, height, padding, border, 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?
Keyword added to a selector that specifies a special state of the selected element
What are CSS pseudo-classes useful for?
Applying a style to an element in relation to the content of the document tree and to external factors i.e. history of navigator, status of content or position of mouse
Name two types of units that can be used to adjust font-size in CSS
Pixels, EMs, percentages
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
What is the default flex-wrap of a flex container?
Nowrap
Why do two div elements “vertically stack” on one another by default?
Div is a block element with a default width of 100%, placing another div naturally goes under the other to take up its’ own width of 100%