0
receiving error for no reason
When I was going to write in this code: <html> <head> </head> <body> <script> document.write("Hello World!"); </script> </body> </html> I received a message telling me there is an error in line 1 of an unexpected token '<' and another error in line 2. but I have literally copied the whole code and I don't know what's wrong.
4 Antworten
+ 6
From what I see, there is nothing wrong in that piece of code. Hm..
+ 6
blackwinter No need to write <!DOCTYPE html>
+ 5
Write it in code playground, and then share the link here, it would be better.
+ 3
Khaled Hondg You must put HTML in HTML tag. Check bluesea's code.
Your code is in Js tag:
https://code.sololearn.com/W1QAkvwaVqz7/?ref=app