CSS Flashcards
What are the names of the individual pieces of a CSS rule?
Selector, declaration, declaration block, property, value
How are key/value pairs related to CSS?
They apply styling to HTML elements
Name three different types of values you can use to specify colors in CSS.
actual color name, RGB, HSL, HEX
What are three important considerations for choosing fonts?
color, font-family, sizing, readability, target market
What CSS properties make up the box model?
Padding, border, margin
Which CSS property pushes boxes away from each other?
Margin
Which CSS property pushes box content away from its border?
padding
Why must you have backup fonts assigned when selecting custom fonts?
To keep another font family to use for the website
What is source order?
Order of operation in the CSS document
What is inheritance?
When all child elements receive the same property as the parent
Why might CSS include this feature?
To write less code, efficiency
Is inheritance a good tool to use for styling? If so, on what occasions?
Yes it helps you simplify properties on multiple elements
What is the purpose of !important?
To override any styling that may have been previously applied
When is !important a good tool to use?
NEVER!!!
What is specificity?
browsers decide which CSS property values are the most relevant to an element and, therefore, will be applied
What is the order of selector strengths for CSS specificity (commonly referred to as the Specificity Hierarchy)?
ID, class, element type, wildcard selector
What are CSS pseudo-classes useful for?
Styling events within html documents
What does the transform property do?
Adjust the element visually on the page
What is the difference between the :first-child pseudo selector and the :last-child pseudo selector?
first child
What are 3 examples of what can be done with CSS transitions?
rotate, transform, skew
Why might transitions be a helpful effect for styling?
visually appealing to users
Are all properties able to be transitioned?
no