Keep getting Error


#1
<!Doctype HTML>
<html>
<head>
    <rel="stylesheet" type="text/css" href="script.js">
    <rel="stylesheet" type="text/css" href="style.css">
</head>


<body>
<img src="http://codecademy.com/assets/codecademy_logo_small.png" id="logo">
    <ul id="nav_container">
        <li><a href="home.html">Home</a></li>
        <li><a href="products.html">Products</a></li>
        <li><a href="services.html">Services</a></li>
        <li><a href="contact.html">Contact</a></li>
</ul>

</body>
</html>

This is my code, and it keeps giving me an error saying i haven’t linked my stylesheet. I’ve checked multiple times that this is in fact the name of the CSS file. Maybe I’m missing some thing stupid?


#2

Nevermind… im dumb… just relaized i forgot my link tags


#3

We do not link to script files. Use,

<script src=""></script>

and load your script after the css. To defer the script, it can be moved to the end of the body element. That way all the HTML and CSS will have been parsed before the script loads and runs.


#4

This topic was automatically closed after 7 days. New replies are no longer allowed.