HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [42]
♦ Subdomain: Everything between the host name (usually www) and the domain name (often .com) is the subdomain. This is used so that large organizations can have multiple servers on the same domain. For example, my department Web page is http://www.cs.iupui.edu. www is the name of the primary server, and this is the computer science department at IUPUI (Indiana University–Purdue University Indianapolis), which is an educational organization.
♦ Page name: Sometimes, an address specifies a particular document on the Web. This page name follows the address and usually ends with .html. Sometimes, the page name includes subdirectories and username information, as well. For example, my Web design course is in the N241 directory of my (aharris) space at IUPUI, so the page’s full address is http://www.cs.iupui.edu/~aharris/n241/index.html.
♦ Username: Some Web servers are set up with multiple users. Sometimes, an address will indicate a specific user’s account with a tilde (~) character. My address has ~aharris in it to indicate the page is found in my (aharris) account on the machine.
The page name is sometimes optional. Many servers have a special name set up as the default page, which appears if no other name is specified. This name is usually index.html but sometimes home.htm. On my server, index.html is the default name, so I usually just point to www.cs.iupui.edu/~aharris/n241, and the index page appears.
Table 5-1 Common Domain Names
Domain
Explanation
.org
Non-profit institution
.com
Commercial enterprise
.edu
Educational institution
.gov
Governing body
.ca
Canada
.uk
United Kingdom
.tv
Tuvali
Making Lists of Links
Many Web pages turn out to be lists of links. Because lists and links go so well together, it’s good to look at an example. Figure 5-2 illustrates a list of links to books written by a certain (cough) devilishly handsome author.
Figure 5-2: Putting links in a list is common.
This example has no new code to figure out, but the page shows some interesting components:
♦ The list: An ordinary unordered list.
♦ Links: Each list item contains a link. The link has a reference (which you can’t see immediately) and linkable text (which is marked like an ordinary link).
♦ Descriptive text: After each link is some ordinary text that describes the link. Writing some text to accompany the actual link is very common.
This code shows the way the page is organized:
Some nice programming books
HTML / XHTML / CSS AIO for Dummies
A complete resource to web development
JavaScript / AJAX for Dummies
Using JavaScript, AJAX, and jQuery
Game Programming - the L Line
Game development in Python
Flash Game Programming for Dummies
Game development using Flash
The indentation is interesting here. Each list item contains an anchor and some descriptive text. To keep the code organized, Web developers tend to place the anchor inside the list item. The address sometimes goes on a new line if it’s long, with the anchor text on a new line and the description on succeeding lines. I normally put the
Working with Absolute and Relative References
There’s more than