Agenda
- What is CSS?
- Why you
should will use it.
- Syntax
- Methods of Styling
- Targeting Elements
- Code Examples
- Cascading Style Sheets
- Set of rules to edit styling of elements called styles
- Multiple styles can infuence a single element, called cascading
- Separation of content from markup
- Cleaner code
- Easier to maintain
- Faster loading times, if done right
- Can you imagine how boring the internet would be without it?!
Rule Syntax
Grouping Rules
Inline
Embedded
Linked
Order of Priority
- Inline
- Embedded
- Linked
ID's
- Elements can be given ID's
- ID's are referenced by a # sign
Classes
- Elements can also be given classes
- Classes are referenced by a .
Can references overlap?
- Cascading Style Sheets
- Styles overlap or cascade
Nesting Selectors
Fonts
Spacing
DOM
- Document Object Model
- Hierarchy of how elements are rendered on a webpage
Padding vs Margin
- Margin = outside the element.
- Padding = inside the element.