receiving error for no reason | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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.

8th Feb 2020, 9:06 PM
Khaled Hondg
4 Respostas
+ 6
From what I see, there is nothing wrong in that piece of code. Hm..
8th Feb 2020, 9:11 PM
šŸ‡ Alex Tușinean šŸ’œ
šŸ‡ Alex Tușinean šŸ’œ - avatar
+ 6
blackwinter No need to write <!DOCTYPE html>
8th Feb 2020, 9:39 PM
AĶ¢J
AĶ¢J - avatar
+ 5
Write it in code playground, and then share the link here, it would be better.
8th Feb 2020, 9:10 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
+ 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
9th Feb 2020, 12:49 AM
Kevin ā˜