JavaScript Assignment #2

"Hello World" Using document.write()

Create a basic "Hello World" script. This assignment is similar to assignment #1, but uses another method available to display information to the user.

  1. Create a basic, empty web page using only html code (see an example).
  2. The page should be completely empty except for the <doctype> <html>, <head>, <title>, and <body> tags that are necessary to make a valid html document.

  3. Insert a set of <script> tags between the <body> tags.
  4. Add document.write("Hello World!") between the <script> tags.
  5. Surround the script tags, or the words Hello World! with a set of <h1> tags.
Final result: "Hello World!" should display in the web page in big, bold worlds as if you had typed it in html.

Next assignment ... Assignment #3