CSS Flashcards
Name three different types of values you can use to specific colors in CSS
- RGB values
- Hexcode values
- Color names
What are three important considerations for choosing fonts?
Possible answers:
- A browser will usually only display the font if it’s installed on the user’s computer
- Important to have a fallback option just in case
- typefaces are usually subject to copyright, so be careful to not infringe said copyright
- Remember to check what the fonts look like on Macs vs PC
- Readability
Why must you have backup fonts assigned when selecting custom fonts?
Just in case the browser doesn’t support the first choice font
What CSS properties make up the box model?
- Margin
- Border
- Padding
- Content
Which CSS property pushes boxes away from each other?
Margin
Which CSS property pushes box content away from its border?
Padding
What purpose does the Cascade serve?
the CSS “Cascade” is the process which the CSS language determines what styling should ultimately be applied to an element
What is source order?
The order that your CSS rules are written in your stylesheet
In what situations might you need to apply styling to a single element multiple times in one stylesheet?
Mobile responsiveness mainly
What is inheritance?
Inheritance is when the child element takes on the values that the parent/grandparent elements have
What is the purpose of !important?
!important overrides styles that have been declared elsewhere in your CSS or inline HTML styling
When is !important a good tool to use?
As little as possible, because using it too much would result in your stylesheet being overrun by !important tags
When is !important a good tool to use?
As little as possible, because using it too much would result in your stylesheet being overrun by !important tags
What is the CSS Cascade?
The process of determining the order/priority of the CSS that gets applied
What does the transform property do?
The transform property allows you to visually manipulate an element by skewing/rotating/translating/scaling