0

So, I am REALLY noob in CSS, as in I have only used it only 1 or 2 times. When I try to change the body's background color it doesn't change at all.

Here is my HTML code:

<DOCTYPE! html>

<html>
<head>
    <link rel = "stylesheet" src = "CSS/main.css">
    <title>
        TESTTITLE
    </title>
</head>
<body>
    <h1>TEST</h1>
</body>
</html>

And here is the CSS:

body {
    background-color : aliceblue;
}

I know this is pretty simple, but I am really a beginner in the whole front end thing.

Jakob
  • 3,493
  • 4
  • 26
  • 42
Klaus Mana
  • 195
  • 1
  • 1
  • 9

2 Answers2

3

You mis-used src.

CSS

<link rel="stylesheet" type="text/css" href="css/main.css">
Caleb Anthony
  • 1,105
  • 9
  • 19
0
<style>
.body {
     background-color: aliceblue;
}
</style>

This is one way to fix your problem if you include a style tag such as this one just before your head tag.

xfactor11
  • 11
  • 6