CSS Flashcards
CSS-syntax
What are the names of the individual pieces of a CSS rule?
= selector and a declaration( which has property and a value)
CSS-syntax In CSS, how do you select elements by their class attribute?
= . classname
CSS-syntax
In CSS, how do you select elements by their type?
= by putting element name
CSS-syntax
In CSS, how do you select an element by its id attribute?
= #idname
CSS-colors
Name three different types of values you can use to specify colors in CSS
= hex code (#FFD700)
= color name (147 names supported by browsers)
= RGB values (rgb 102,205,180)
CSS-box model
What CSS properties make up the box model?
= border, margin, padding, width, and height
CSS-box model
Which CSS property pushes boxes away from each other?
= margin
CSS-box model
Which CSS property add space between a box’s content and its border?
= padding
CSS-pseudo class What is a pseudo-class?
= a class you can change the appearance of elements when a user is interacting with them. (ex. :hover) = to add styles to selectors, but only when those selectors meet certain conditions
CSS-pseudo class What are CSS pseudo-classes useful for?
= for defining a special state of an element.
= (applying styling element when mouse hover over it.)
= styling selectors
CSS-fonts
Name two types of units that can be used to adjust font-size in CSS
= pixels, em, rem
CSS-fonts
What CSS property controls the font used for the text inside an element?
= font family
CSS-flexbox
What is the default flex-direction of a flex container?
= row
CSS-flexbox
What is the default flex-wrap of a flex container?
nowrap : all flex items will be on one line.
CSS-layout
Why do two div elements “vertically stack” on one another by default?
= because div elements are block level elements.
block-level elements start on a new line