I got an error as compilation error in line 1, char 1, syntax error, code -800A03EA and I have searched in google but unable to resolve this issue. Can anyone help me to go through this. My program is
I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (
</>) will also add backticks around text.
The code you posted is your
yes and I want to know why this error ? is there any problem with my coding or anything else. Can you help me ?
This is HTML code and you put it in a JS file. There’s your problem The part inside
<script> is the code that goes in the
rename the file to
first.html - html files should not have the
.js extension - make sure you have the complete filename visible in Windows Explorer - this is done by unchecking the “Hide extensions for known file types” option in Folder Options:View
IE gives the error because it tries the run the entire file as a jscript file - which it is not
hopefully you got the page to load after renaming the file - here’s a few tips on your html so far
always start your html file with the doctype declaration - it should be the very first thing on the very first line of the file
Any text content that you want shown on the web page must be somewhere inside the
<body> element - don’t put any text for display in the
<head> element - browsers will still show the misplaced text after moving it to inside
<head> element is not a heading for the page - use the
<h1> tag inside
<body> like this
there was a time when the
type attribute for
.js extension but it’s not required - the filename is referenced in the html with the
src attribute of an empty
<!-- first.html -->
This is so cool, I never knew that before Now I can use crazy things as an extension
Thanks a lot
I could make it now.
Thanks alot Sangeeta and PPC i am also getting same error, Finaly i got Solution in FreeCodeCamp.