University of Malta  WWW WORKSHOP 

SESSION 3
FURTHER HTML STRUCTURES


Contents

Images

One of the more obvious features of Internet pages is that they are multimedia, containing not just text, but other kinds of material such as sounds and images. In order to incorporate images into the web pages that we compose, we need to address two namely, where do images come from, and once we have them, what must we do to display them on pages?

Where Images Come From

In order to include an image in a hypertext, it is first necessary to know have the URL of an image file (this will usually have the suffix ".gif" or ".jpg"). Extensive image resources are available on the Web (see the links page).

Warning: Some files (e.g. ) are very small and do not take long to load. Beware of huge images which look wonderful but take ages to load. They just put people off!

For this session, we will need to download some (small!) images, but before doing so, we will create a local directory (i.e. folder) in which to keep them. I strongly recommend that you begin to think about a file organisation structure that is useful for supporting a simple website. A useful rubric is to "think directories, not files".

In accordance with that rubric, we already created a home directory called "home" in the last session in which all your web pages can be stored. Now we'll create a directory called "images" within home specifically for holding images. Here's how to do it:

Now we will access some handy images as follows We are now in a position to create a page containing images using Composer.

Handling Images with Composer

The image now appears on the web page underneath the cursor. You can now manipulate the image by

Tables

How to Create Tables

The easiest way top create a table is by using a fixed-width font. The problem with tables written in this way is that they are very sensitive to changes in font, contents etc.

Inserting a Table Structure

A more robust and flexible kind of table can be produced using the built in "table" structure. Now that the table is there, you can go about filling it. Put the contents you want into the cells you want. Within cells, anything goes. You might wish to try You can of course cut and paste from other parts of the page if you wish.

Inserting Rows or Columns

To add an extra row or column:

Changing the Width of a Table

Selecting and Deleting Tables

Setting Table Properties

More About Tables

More about tables is to be found in Netscape's built in help feature.

Exercise

Create a table representing a page in a week-per-page diary. <.a>

Tables and Images Together

One extremely useful feature of tables is that they provide a way of controlling exactly how items will relate to each other on the page. A simple example of this is the following navigation bar.
Another example of something useful to be done with tables and images is this
customised bullet list

Exercise

The aim of this exercise is to reproduce the navigation bar above and place it inside a file ("navbar.html". I suggest that you create a special directory within your home directory for items like this. One way to make the item is as follows: In the next session we will learn about non-local links.
Course Home CSC Home Resources Session 2 Session 4

Mike Rosner (mros@cs.um.edu.mt)

Last modified: Fri May 7 18:22:50 1999