Wednesday, December 28, 2016

How to create an html page

To use javascript you need an Html page where it can "live".

The structure of an html page is this:

<html>



</html>

Inside this two tags we will put our text into the body tags, like this:

 
<html>
   </body>

  </body>
</html>


Now we will add the tags to insert the javascript code. Let's write something in it too.


 

<html>
   </body>

      <script>
        document.write("Hello World!")
      </script>

  </body>
</html>


Now, save this file as index.html, click on it twice and the browser will open and you will see the words Hello World. The first html page with js code is done.

See ya for the next blog post.

No comments:

Post a Comment