Skip to content

HTML file is not loading in browser

newbie here, I can’t seem to load my html file on any browser, pls help?

I followed the instructions from Head First Javascript Programming from O’Reilly and am trying to open my file ‘behavior.html’ on my browser. Isn’t working on Chrome, Safari or Firefox. I’ve tried changing the <!doctype html> with just <html>but the result is the same. What is supposed to happen does not happen. Here is an image of what comes up: browser.

The code is

<!doctype html>
<html lang=“en”>

    <head>

        <meta charset=“utf-8”>

        <title>Just a Generic Page hola</title>

        <script>

            setTimeout(wakeUpUser, 5000);

            function wakeUpUser() {

                alert(“Are you going to stare at this page forever??????????”);

            }

        </script>

    </head>

    <body>

        <h1>This is called a heading</h1>

        <p>Not all too much to read here. I’m a paragraph from a JS book and Tony’s mind.</p>

    </body>

</html>

Answer

replace with ", and remove that “` at the beginning avoid to copy paste formatted source code, you should write it or paste without format.