Jump to content

Recommended Posts

Posted
<link href="styles.css" rel="stylesheet" type="text/css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="http://localhost/favicon/browserIcon">
<title>Altraz</title>

HTML ^

Full code:

<!DOCTYPE html>
<html>
    <head>
        <link href="styles.css" rel="stylesheet" type="text/css">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="icon" href="http://localhost/favicon/browserIcon">
        <title>Altraz</title>
    </head>
    <body>
        <h1>Altraz</h1>
    </body>
</html>

 

body {
  background-color: dimgrey;
}

CSS ^

 

 

 

Whenever I run this, the background is still white.

Posted

This would greatly depend on where the css file is located, and where the html file is located. Are they in the same Folder/Directory?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...