1What is CSS and why is it used?
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation and visual styling of HTML documents.
Purpose of CSS:
- Controls the visual appearance of web pages (colors, fonts, layouts)
- Separates content (HTML) from presentation (CSS)
- Enables responsive design for different screen sizes
- Improves website maintainability and consistency
- Reduces code repetition across multiple pages
Example: