CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Selector of the HTML element and declaration of property and the value and declaration block
In CSS, how do you select elements by their class attribute?
.
In CSS, how do you select elements by their tag name?
Element name
In CSS, how do you select an element by its id attribute?
#
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, border, margin, padding,
Which CSS property pushes boxes away from each other?
The margin is an invisible space around your box. It pushes other elements away from the box like a puffy jacket but you urself are not bigger, space outside the element
Which CSS property add space between a box’s content and its border?
Padding
What is a pseudo-class?
selector that selects elements that are in a specific state, condition met also just a class
What are CSS pseudo-classes useful for?
Specifies a special state of the selected element
Name two types of units that can be used to adjust font-size in CSS.
pixels , percentages, ems
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, single line
Why do two div elements “vertically stack” on one another by default?
It is a block element so starts on a new line