The platform on which your web world is built.

It used to be that HTML was like a very crude word processor. Text documents were the maps for webs of files, and various tags controlled the appearance and functionality of the text. As browsers gain power, HTML has been extended to do other, neater things.

But you still need to build on the basics.

Linking

URL stands for Universal Resource Locator. This is a clunky way of saying "the address of a file on the Web." Links are the connective tissue of the web. You can link to most types of files, to other HTML documents, to files in a variety of media. The basic structure of a link is the same regardless of what you are connecting to:

<a href="http://www.itp.tsoa.nyu.edu">link to the ITP server</a>

The example above is an example of an absolute URL because it contains the entire address of the file to which you are linking. The alternative to this is a relative URL, which contains an address relative to the document which contains the link. For example:

<a href="mtc.html">link to Mike's homepage</a> This will link to a page in the same directory as the page with the link. The simplest way to organized your web documents is to keep all of the HTML pages in the same folder so that links can be as simple as the one above.

Another type of relative URL would look like this:

<a href="/~boom/mtc.html">link to Mike's homepage</a> Which is using the tilde and "boom" to indicate that the page in question is in the home directory of user boom on the server which hosts the pages. This is a useful method when linking between different home directories on a server. I.e. from one user of the same machine to another on the same machine.

As a general rule, relative URLs make your documents more portable from server to server, but absolute URLs don't get screwed up so often. There are certain types of links, such as links to certain cgi-bin programs, which must be absolute.

Another type of link is the named anchor. As a normal link contains two parts, the link and the target which are two separate documents, the named anchor lets you jump to a particular part of a document. This can work within one document. To link to a specific part of another document the code looks like:

<a href="anotherpage.html#middle">go to the middle</a>

and it's target looks like:

<a name="middle">this is the target</a><p> To do this within a single page, the code will look like:<p> <xmp><a href="#bottom">click here to go to the bottom</a> and the target will be the same: <a name="bottom">the bottom</a> Styles

There are two different types of styles which both work similarly to the styles of any word processor. The difference between them is that logical styles are influenced by the preferences that a user can enter into their browser and physical styles are not. Because of this flexibility, logical styles are often recommended by people who have opinions about things like this. Styles are used in the following way:

<strong>this is really important!</strong>

Escape Sequences

Since some characters have special significance in HTML, i.e., that they are used in tags, you have to use special techniques to display those characters on the screen. The same thing applies for characters that are not part of the ASCII character set such as letters with accent marks. An important thing to remember is that escape sequences are case sensetive.

For a comprehensive list of escaped characters, check this site. For example:

&lt;
the escape sequence for <
Lists

There are several types of lists which are useful in your pages. You can nest these lists within one another in order to make outlines and whatnot.

The ordered list begins with a number or a letter:

<ol> <li>the first thing <li>the second thing <li>the third thing </ol> Will appear like this:

  1. the first thing
  2. the second thing
  3. the third thing

Unordered, or "bulleted" lists work very similarly:

<ul> <li>the first thing <li>the second thing <li>the third thing </ul> Will appear like this:

Another nifty type of list is the definition list. It works like this:

<DL> <DT> apple <DD> a tasty fruit <dt> orange <dd> another delicious fruit </DL> Which looks like this:
apple
a tasty fruit
orange
another delicious fruit
You can also give a definition list the compact attribute, as follows:

<DL compact> <DT> apple <DD> a tasty fruit <dt> orange <dd> another delicious fruit </DL> Which looks like this:
apple
a tasty fruit
orange
another delicious fruit

Building Web Sites - ITP Winter 1999 - Mike Cosaboom, Instructor
mc39@acf2.nyu.edu