What is CSS
What is CSS
• CSS allows us to change colors, fonts, spacing, and layout of HTML elements to
make them look more appealing.
Internal CSS: Inside a <style> tag in the <head> section of your HTML document.
External CSS: In a separate .css file, which is then linked to the HTML file.
• Property: The style feature you want to change (e.g., color, font-size).
• Value: The specific setting for the property (e.g., red, 16px).
1. Color
Background-Color
Font-Size
Padding
css
Copy code
padding: 10px;
Margin
css
margin: 15px;
• Class Selector: Targets elements with a specific class. Classes are reusable.
• ID Selector: Targets a unique element with an ID. IDs should be unique on each
page.
Practice Task
o Change paragraph text color to dark gray and font size to 16px.