Module1-what is CSS Flashcards
What does css stand for
Cascading Style Sheets
What are the ways to add css styling to an html page
- inline within an element with a style attribute
- style tag in the head
- css file with rel=stylesheet and href to the file location in the html head
- frameworks
What is a css rule
a style decleration consists of a property that we want to change and the value we want to give that property with a colon between them and a semi colon to close the decleration
What is a selector
A selector is the way we tell css what elements to style. You write the name of the selector and then open curly braces and the css rule inside
What are the different font family types
- standard
- serif
- sans-serif
- monospace (fixed-width)
Where can I find cool fonts
Google fonts
what selectors are there?
universal - * element selectors - element type class selector. - . id - # attributes - [ ]
specificity
inline > id >class, :pseudo class and [attribute] selector,> and ::pseudo element selectors
The rule with the most details has hire specificity
what does inherit do?
elements inherit the styles of their parents. The specificity of inheritance is the lowest so any element selected directly will override it. If we want to have the inherited style we need to add the keyword inherit to the style
combinator
allows us to combine selectors.
4 types of combinators
\+ adjacent sibling elements share the same parent second element comes immediately after the first one ~ general sibling elements share the same parent > child direct child " " descendant