Class Notes: 

In the book chapter two and parts of five.

Recall the basic XHTML template.

<?xml version="1.0"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www/w3/org/TR/xhtml/11/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>  </title>

</head>

<body>

</body>

</html>

 

Now lets build.

Where do we build them?

How do we build them?

Where do we save them?

How do we save them?

Why is hypertext hyper?

A hypertext document is one that contains the elements called links that allow users to activate a particular part of the screen to perform some action. The actions that we will look at include

  1. Navigating to another part of the document
  2. Navigating to another document on the same web site.
    * We will also look at navigating to another part of ANOTHER document of the same web site AND potentially navigating to another part of an external document.
  3. Navigating to an external web site.

Let's drop anchor here and get started!

Like most new concepts introduced this semester we will start by introducing a new tag called the "anchor" tag.

<a>   click me   </a>

source anchor vs target anchor

Two important attributes for the anchor tag.

Intrapage links.

<a href="#area1"> area1 </a>

<a id="area1"> adfgfdagakjdfghf </a>

<a href="file1.html#area1"> area 1 on file one page </a>

Intrasystem links.

<a href="page3.html"> click me for page 3 </a>

Intersystem links.

<a href="http://www.cs.pitt.edu"> take me to the CS web site! </a>

This is absolutely the path to a successful link, relatively speaking..

In most Intrasystem links you will find it necessary to provide the path to the html document you want to link to. This can be done by use of the absolute or relative paths. We will primarily be using the relative path.( See page 113 in your book.)

 

                       |-- folderz --- file1.html
folderx  --- foldery --
                       |-- folderq --- file2.html


<a href="../../folderq/file2.html> in file1.html will get me from file1.html in folderz to file2.html in folderq

 

 

 

Final thought: A begin quote always requires a matching end quote. For instance an attribute value should be entered as "page1.htm", and so on. If you enter "page1.htm without the matching end quote the attribute value will be misinterpreted!

This concept of pairing is also central to the concept of tags. Every tag is really a pair consisting of an opening tag and a closing tag. We call this pair a container tag.