CSS Flashcards
What are the names of the individual pieces of a CSS rule?
selector, declaration block
property and values
In CSS, how do you select elements by their class attribute?
In Css, you select the class attribute with the .class selector
In CSS, how do you select elements by their type?
In css you select elements by their type by just typing the element
In CSS, how do you select an element by its id attribute?
In css, you select the id attribute with the #id selector
Name three different types of values you can use to specify colors in CSS.
RGB(x,x,x); hex code #234513; and color names that are predefined
What CSS properties make up the box model?
There are always three properties to a css box model. Border, margin, and padding.
Which CSS property pushes boxes away from each other?
The property that pushes boxes away from each other is margin.
Which CSS property add space between a box’s content and its border?
The property that adds space between the box content and its border is padding.
What is a pseudo-class?
class applied by the browser when an element is in a specific state.
What are CSS pseudo-classes useful for?
Changing what an element is doing based on what the user is doing. They also simplify processes that would otherwise take more time to do
Name two types of units that can be used to adjust font-size in CSS.
The types of units that can adjust the font-size in css are pixels (px), percentages (%), and EMS (em)
What CSS property controls the font used for the text inside an element?
The css property that controls the font used for inside the text element is font-family
What is the default flex-direction of a flex container?
The default flex-direction of a flex container is a row
What is the default flex-wrap of a flex container?
The default of a flex-wrap is nowrap in a flex container.
What is the default value for the position property of HTML elements?
position: static; is the default property for html elements