@Amrita_dey
From what I see in the code, it is an HTML script, so you can use the ‘.html’ extension to save and open the webpage.
Taking reference to your previous query in
why is this error occuring?
sharing a screenshot…
The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. javascript.html.html [IMG_20211209_104004]
It looks like you were using a different code that has 16 lines of code, while the code in this post has only 10. Can you please confirm whether they are the same?
1 Like