Before HTML basics: Web Basics

  1. What is the World Wide Web?
  2. Introduction to URIs
  3. Fragment identifiers
  4. Relative URIs
  5. URI Usability

What is the World Wide Web? (Technically speaking)

The World Wide Web or simply Web is an information resources network.

It is based on three mechanisms to make these resources readily available anywhere:

  1. A naming scheme (URIs) for locating resources.
  2. Protocols (HTTP, FTP, etc.) for access named resources.
  3. Hypertext (HTML) for easily formatting and navigate among resources.

The ties between these mechanisms become clear throughout the HTML specification.

Interested in WWW History? Follow the links in WWW Unofficial History article.

Introduction to URIs

Every single resource available on the Web (HTML document, image, video clip, program, etc.) is uniquely identified by an address encoded into a Universal Resource Locator (URI).

URIs consists of four pieces:

      <scheme name> : <hierarchical part> [ ? <query> ] [ # <fragment> ]
  1. The scheme name, usually concerns about the kind of the resource and how to access them (protocol).
  2. The hierarchical part, usually concerns about identifying the resource. It has two parts:
    • The name of the machine (or user) hosting the resource.
    • The name of the resource itself, given as a path.
  3. The query part may provide some additional identification information (not hierarchical).
  4. The fragment part may provide some additional identification information (to a secondary resource).

Consider the following URI:


This URI may be read as follows:

There is a document (w3c-compliant-xhtml-valid.html) available via the HTTP protocol.

Residing on the machine

Accessible by the path "/features/".

Other schemes may be seen in HTML documents including "mailto" for email and "ftp" for FTP.

Here is another example of a URI. This one refers to a user's mailbox:

           ...this is text...
           For all comments, please send email to 
           <a href="">MarcRic</a>.

The term "URL" is much more familiar then "URI".

URLs form a subset of the more general URI naming scheme.

URI Diagram

Fragment identifiers

Some URIs refers to a location within a resource. This kind of URI ends with "#" followed by an anchor identifier (called the fragment identifier. For instance, here is a URI pointing to an anchor named Generic_syntax:

Relative URIs

A relative URI doesn't contain any naming scheme information. Its path generally refers to a resource on the same machine as the current document. Relative URIs may contain relative path components (e.g., ".." means one level up in the hierarchy defined by the path), and may contain fragment identifiers.

Relative URIs are resolved to full URIs using a base URI. As an example of relative URI resolution, assume we have the base URI "". The relative URI in the following markup for a hypertext link:

         <A href="html-course.html">Suppliers</A>

Would expand to the full URI "", while the relative URI in the following markup for an image

         <IMG src="../icons/logo.gif" alt="logo">

Would expand to the full URI "".

URI Usability

In HTML, URIs are used to:

In Usability terms, try to keep your site URI as small and clean as possible.