COM 1100 Fall 2000 -- Prof. Futrelle -- Lab 1 Directions

Writing a program that outputs a web page

Lab date: September 27, 2000.

First Step:

Write a program that prints out the following --

< html >

< body >

< h3 > Hello World! < /h3 >

< /body >

< /html >


Second Step:

Copy your result and then paste it into notepad or whatever... and then save the file as hello.htm

Note that the filename extension should be .htm or .html.


Third Step:

Open your file in any Browser, such as Internet Explorer or Netscape and see what happens.

You should see your "dynamically generated" "Hello World!" page.


For those students who can finish the first section easily, please try one of the following:

First Step:

Instead of using cout explicitly in main(), write and use procedures:

For example:

You can write the following procedures:

html() which outputs the string: < html >

htmlend() which outputs the string: < /html >

body() which outputs the string: < body >

bodyend() which outputs the string: < /body >

The second and third steps are the same as in the basic assignment.


If these are still too easy for you, use some type of looping statement to produce a lot of repeated or varying output. Or if you know some interesting HTML you might want to use code to produce something with repetitive structure such as a table.

Back to general lab directions.