CSS Flashcards
what are the names of the individual pieces of a CSS rule?
selector, declaration block, property, value
how do you select elements by their class attribute?
.class element
how do you select elements by their type?
element name {}
how do you select an element by its id attribute?
id element
Name three different types of values you can use to specify colors in CSS
RGB values, hex code, color name
rgb a , hsl , hsl a
what css properties make up the box model?
content(height, width), 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?
A css pseudo class is a keyword added to a selector that specifies a special state of the selected element. ex) :hover can be used to change a button’s color when the user’s pointer hovers over it.
what are css pseudo classes useful for?
Pseudo classes let you apply a style to an element not only in relation to the content of the document tree, but also in relation to “external factors” like the history of the navigator(:visited), the status of its content(:checked), or position of the mouse (:hover)
Name two types of units that can be used to adjust font-size in CSS.
rem, px, 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 in ltr; right to left in rtl
what is the default ‘felx-wrap’ of a flex container?
nowrap : all flex items will be on one line
why do two div elements “vertically stack” on one another by default?
images default is set to full width .