74.9k views
1 vote
Create and apply a CSS class named YellowBackground that selects a yellow background. Apply the class to your HTML file’s body tag.

User Sam Wilson
by
8.7k points

1 Answer

6 votes

Here is an HTML example with the CSS class defined inline:

<!doctype html>

<html>

<head>

<style>

.YellowBackground {

background-color : yellow;

}

</style>

</head>

<body>

<h1>A yellow background</h1>

</body>

</html>

User Shane Tomlinson
by
8.8k points