(Solved):What are Cascading Style Sheets used for?

 

Question

What are Cascading Style Sheets used for?

 

EXPERT ANSWER

The main reason for using CSS style sheets within a webpage is that these sheets specify styles or layout designs for multiple web pages that can be managed for different devices and even if the screen size varies.

Example:

<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-color: red;
}
h1 {
  color: yellow;
  text-align: left;
}
</style>
</head>
<body>
<h1>Using CSS...</h1>
<p>CSS is used to design the heading element.</p>
</body>
</html>

Output:

Scroll to top