Ways to Add CSS
Three ways to add CSS
1. Inline CSS
<p style="color: teal;">Hello CSS</p>
Inline CSS applies to one element. It is useful for quick experiments but hard to maintain at scale.
2. Internal CSS
<style>
h1 { color: teal; }
</style>
Place a style block in the HTML document’s head.
3. External CSS
<link rel="stylesheet" href="styles.css">
External CSS keeps styles in a reusable file and is usually the best choice for multi-page sites.
Practice
Create styles.css and link it to two HTML pages. Change one shared heading style.
Want to learn this professionally?
Explore practical IT training at Cyber Code Academy.
View Academy Courses