CSS Flashcards
In CSS, how do you select elements by their class attribute?
You select elements by their class attribute by putting a period followed by the class name
In CSS, how do you select elements by their type?
You use a type selector which is just the name of their element
In CSS, how do you select an element by its id attribute?
You would use an id selector which is a # followed by the id name.
What are the names of the individual pieces of a CSS rule?
Selector declaration block properties values
Name three different types of values you can use to specify colors in CSS.
color name, hexcode, rgb values
What CSS properties make up the box model?
border, padding margin content(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?
A CSS pseudo-class is a class applied by a browser, but we can not add them ourselves.
What are CSS pseudo-classes useful for?
Styling elements with relation to external factors and making styling easier.
Name two types of units that can be used to adjust font-size in CSS.
px, rem or 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?
Default flex direction is row
What is the default flex-wrap of a flex container?
Nowrap - all fit on one line
Why do two div elements “vertically stack” on one another by default?
They are block level elements