I'm having trouble getting my external css link to work. Can anyone help?


#1

<!doctype html>

Hello World

Hello World

Testing Atom


#2

You will need to post your code as code for it to display on the forum. Highlight your code and press the </> button above the editor.


#4
  the code in question 
 <!doctype html>
    <html>
    <head>
      <title> Hello World</title>
      <link rel="stylesheet" href="style.css" type="text/css">
    </head>
    <body>
      <h1> Hello World</h1>
      <p> Testing Atom</p>
    </body>
    </html>
the css in the style.css file:
    h1{
      color: red;
    }

        indent preformatted text by 4 spaces

#5

Where are these files on your computer?


#6

Atomtestfile


#7

I notice that Hello_world doesn’t have a file extension. Try renaming it with .html at the end.

Also, you should consider how you name your files. Unix systems have case-sensitive filenames, and a majority of web servers are Unix-based. If you have a file named About.html and a visitor to your site tries to navigate to about.html, if your server isn’t configured correctly, they might not find your file. It’s good practice to keep file names lowercase.