Webpage background color


I'm having trouble trying to change the color of my background. I tried using this:

.body {
background-color: black;

as well as this:

.body {
color: black;

But to no avail. If you know how to change the background's layout color effectively, please help.

Thanks in advance.


Nevermind! I stumbled across the answer on accident :slightly_smiling:

The correct format/syntax uses the body and style tool in the HTML script. Here is an example:

<body style="background-color:lightgrey;">

It was so easy all along...


To be honest, you dont need the .body all you need is body { } unless you have a class called body as the full stop calls a class as a# calls an ID.

And yes you can do it within the html code but this is not the "cleanest" way of doing it.