Create a CSS class called 'YellowBackground' that changes the background color to yellow. Then, apply this class to the 'body' tag in your HTML file.
Computers and Technology · High School · Mon Jan 18 2021
Answered on
Certainly! In your CSS file:
css
Copy code
.YellowBackground {
background-color: yellow;
}
And in your HTML file:
html
Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="your-stylesheet.css">
<title>Your Page Title</title>
</head>
<body class="YellowBackground">
<!-- Your page content goes here -->
</body>
</html>
Make sure to replace "your-stylesheet.css" with the actual filename if it's different.