FREE COURSE | BEGINNER
CSS Fundamentals
Learn how to transform simple webpages into beautiful, responsive websites.
01. Introduction to CSS
CSS stands for Cascading Style Sheets. It controls the appearance and layout of webpages.
What can CSS do?
- Change colors and fonts.
- Design webpage layouts.
- Add spacing and borders.
- Create responsive websites.
02. CSS Syntax
A CSS rule consists of a selector and a declaration block.
Understanding the code
- h1 - Selector
- color - Property
- teal - Value
- color: teal; - Declaration
03. CSS Selectors
Selectors identify the HTML elements that we want to style.
Element Selector
Class Selector
ID Selector
04. Colors and Backgrounds
CSS allows us to customize text colors and background colors.
Colors can be defined using color names, hexadecimal values, RGB, and HSL.
05. CSS Box Model
Every HTML element is represented by a rectangular box.
- Content - Text or images.
- Padding - Space around the content.
- Border - Surrounds the padding.
- Margin - Space outside the border.
06. Try It Yourself
Modify the CSS properties below and click Run CSS to see the changes.
07. Knowledge Check
Test your understanding of CSS fundamentals.