- The last assignment
- Questions from Last Time
- How the Web Works
- Basic Tags
- Putting your HTML on the Web
- Searching the Web
How the Web Works
- Your computer is the client.
- You use a web browser to connect to a
- When you connect to a server, you request specific
content in the URL.
- That content is typically a text document marked
up with HTML: a web page.
- The content is sent back to the client machine
where the web browser renders
- The web page can include additional URLs which you
can follow to find more content...
<html>: all HTML documents
should begin and end with this tag.
<head>: the first item in an
HTML document is the
which potentially contains a bunch of stuff we
don't care about.
<title>: the one thing the
<head> contains that we do
care about is the title of the document set in
between these tags.
<body>: after the head of the
document comes the body, which contains most
everything that is displayed on the web page.
The body is set between these tags.
<p>: this starts a new
paragraph and does not need to be
<br>: this starts a new line
and is not paired.
<hr>: this draws a line across
the screen and is not paired.
<h1-6>: headings are set with
these tags; there are six levels.
<strong>: important text should
be set in these.
<em>: emphatic text should be
set in these.
<i>: if you want to directly
set something in italics, use these.
<b>: if you want to directly
set something in boldface, use these.
<pre>: these mark text that is
set in a monospaced font and set
exactly as typed.
<center>: to center text.
<ol>: sets an ordered list;
each item has a number.
<ul>: sets a bulleted list;
each item has a bullet.
<li>: marks an individual item
in either of those sorts of lists: does
not have to be paired.
<a href="">: marks a hyperlink
to another document or another place in the
<a name="">: marks a location
that can be hyperlinked to.
- Entities. Since angled brackets are used to mark
tags, if you want to type one of them directly,
you need to use a special character. These
character entities always begin
with an ampersand (&) and end with a
semicolon (;). We therefore need special
character entities for left and right angled
brackets and for ampersand:
- Left angled bracket
- Right angled bracket
- Ampersand (
Putting your HTML on the web
- Once you've created and tested your HTML file on
your own computer, you need to put it on the
mainframe. The easiest way to do this is with
SSH program. The file needs to
be put in a directory that is visible to the
web. This is typically called
public_html, but may be called
something else on some machines.
- Editing your HTML remotely. You can do all your
editing on your own computer, re-uploading the
file each time. However, you may prefer to make
minor modifications on the file directly on the
remote host. There are several programs
generally available on mainframe computers for
editing your HTML. The easiest to use is
pico and it is available on both
syntax and the u-cluster.
- Once you've got the file in the appropriate place
on the remote machine, you should confirm that
it is visible over the web. If I put an HTML
myfile.html on the
syntax machine, the URL is:
- You may get an error when you try to access this
file over the web. There are three possible
kinds of errors. One possibility is that you get
an error that indicates that the file isn't
found. This usually means that you put it in the
wrong place or entered the wrong URL. Another
possibility is that the HTML code is wrong; this
usually results in it simply displaying
improperly in some way. A third possibility is
that you may get a "permissions" error. This
means that the file needs to be set to be
readable by all. This can be fixed by executing
this command on the remote machine.
Searching the web
This chapter includes a discussion of the
module and describes a program
websearch.pl) that uses it to search the
web in an automated fashion. I won't cover this because
of time constraints.