Keep getting Error

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

<img src="" 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>


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?

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

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.


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