CS 10, Fall 1997
HTML Lab: Getting Started with a Web Page
Introduction
HTML (HyperText Markup Language) is a "markup" language for specifying
the structure of a document to be viewed on the World Wide Web.
An HTML source file consists of ordinary text, together with "tags" which
tell a web browser (such as Netscape) to do things like start a
new paragraph, create a list, or link to another document.
Your goal for this discussion period is to write a short web page
of your own.
Instructions
- Copy the "HTML" folder from the Classes file server to your disk
(or to the User Folder); drag the Classes file server to the Trash.
- The "HTML" folder contains two text files:
starter.html
and sample.html.
Open the file starter.html in SimpleText
by double-clicking on its icon.
This is what a very simple HTML source file looks like.
- Launch Netscape on your computer.
- View how Netscape displays the
starter.html
file by selecting "Open File" from the File menu
(hot key: <Command>-O).
- What is the effect of the
<TITLE> ... </TITLE> tag-pair?
- What is the effect of the
<H1> ... </H1> tag-pair?
- What is the effect of the
<P> tag?
- HTML has tags to specify text style, lists of various types,
tables, anchors to other documents or images, and many other types
of document elements.
Examples of some of these are in
the source file sample.html.
Follow the procedure above to open the sample.html
file both in SimpleText and
in Netscape.
(Note: the source of a document viewed in Netscape can be seen
by choosing "Document Source" from the View menu.
This is a common way of learning new ways of using HTML.)
- Edit starter.html (using SimpleText) to
produce a web page of your own. Add some links and images to your
page.
Credits and References:
This lab was originally authored by Stephen Davis, Visiting Professor of
Computer Science at Swarthmore during the 1995-96 academic year.
Among the sources for this lab are Judith Wilson, Visiting Professor of
Computer Science at Swarthmore College,
Michael Gelman of the Swarthmore College Computing Center,
the University of Edinburgh Department of Artificial Intelligence
example HTML page,
the National Center for Supercomputing Applications'
Beginner's Guide to HTML,
the
HTML Quick Reference page at the University of Kansas,
and Ian Graham's
Introduction to HTML and URLs at the University of Toronto.