Ask coding questions

← Back to all posts
my code isn't running anymore
awelawi (0)

Hi there, so I've been creating a sample website. Right now, when I run the code it only brings out a blank colored body. (I set the body background-color to corn silk) but nothing else shows. I've gone over the code several times, and it worked throughout the day but I went on a break and now it's just bringing out the color of the body. Any idea as to what could be wrong. I initially thought it was my internet connection but it's not.

Answered by Coder100 (16804) [earned 5 cycles]
View Answer
Coder100 (16804)

The error is on line 14:

you never closed off the script tag so the rest became invalid.

  <script src = "/script.js"></script>

see the difference?

awelawi (0)

@Coder100 Yikes!! I just saw the error :) Such a tiny mistake I didn't even notice. Thank you so much. I've seen the difference.

Coder100 (16804)

@awelawi np :D
mark as correct answer?

RohilPatel (1534)

Stop asking for cycles lol @Coder100



try closing off the script tag. Try this code.

<script src = "/script.js"</script> 
<!-- inital code -->
<script src = "/script.js"></script> 
<!-- correct code -->

like that.
That should work