Jump to content
Sign in to follow this  
heqagon

My CSS file is not linking with my HTML file

Recommended Posts

<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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...