1.uncaught syntax error: unexpected token<. 2. Change the text add your name here with your actual name using js | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

1.uncaught syntax error: unexpected token<. 2. Change the text add your name here with your actual name using js

How to solved it? in chrome it shows unexpected error?what I do now? <!DOCTYPE HTML> <html> <head> <body> <p>Welcome</p> <button onclick="myFunction()">hit me</button> <p id="demo">Hello</p> <script> function myFunction(){ document.getElementById("demo").innerHTML="Hello Pavithra"; } </script> </head> </body> </html>

25th May 2020, 12:00 PM
Pavithra Muniyandi
Pavithra Muniyandi - avatar
2 Answers
0
<head> <head/> Remove closing head tag from body.. Close it before opening body tag Or totally remove head tag.. Since there is no head...
25th May 2020, 6:42 PM
Jayakrishna 🇮🇳
+ 2
Share your code, so that we can help you.
25th May 2020, 12:09 PM
Manu_1-9-8-5
Manu_1-9-8-5 - avatar