CSS Flashcards
What is the purpose of the CSS inherit property?
Certain attributes are not automatically inherited, those can be forced to inherit using this property.
Name three different types of values you can use to specify colors in CSS.
Named colors / Hex / RGB
What CSS properties make up the box model?
Content / 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 does “Border Box” accomplish?
It includes the border and padding into the total width and height.
What is a pseudo-class?
To target a special state of an element.
What are CSS pseudo-classes useful for?
To change the styling of elements.
How do you declare direct child in CSS selector?
a > b
How do you declare descendant in CSS selector?
a b
Name at least two units of type size in CSS.
px / rem
What CSS property controls the font used for the text inside an element?
font-family
What does “margin: auto” do?
Centers the item on the page horizontally if the element has been given a width.
What is justify-content used for?
How the group of items should appear on the page horizontally.
What is align-content used for?
How the group of items should appear on the page vertically.