CSS Introduction(Cascading Style Sheets):
CSS (Cascading Style Sheets) is a styling language used to control the appearance of HTML elements. It allows developers to separate content from design, making web pages more visually appealing and easier to maintain.
Why Use CSS?
- Improved Design – Enhances the look of web pages with colors, fonts, spacing, and animations.
- Separation of Content & Style – HTML handles structure, while CSS controls presentation.
- Reusability – A single CSS file can be applied to multiple pages.
- Better Layout Control – CSS provides powerful layout techniques like Flexbox and Grid.
- Responsive Design – Ensures websites work well on different screen sizes.
Ways to Apply CSS
1. Inline CSS (Applied directly within an HTML tag)
<p style="color: blue;">This is a blue paragraph.</p>
- Use Case: Quick styling, but not recommended for large projects.
2. Internal CSS (Defined inside <style>
within the <head>
)