Thursday, 1 November 2007

What are embedded links?

Links and URLs

From http://www.cs.nott.ac.uk/~hla/G5BIAW/lecture4/

HTML documents often have hypertext links in them which mean you can click on the highlighted text and the WWW browser automatically retrieves and displays the document named by the link.

The "hypertext link" is a clickable piece of text that retrieves and displays the object described by "http://myurl".

The source of the link is the text between the A tags, and the destination of the link is the value assigned to HREF inside the opening A tag.

The value assigned to HREF is usually a Uniform Resource Locator (URL).


URLs

URLs are names given to almost every chunk of information on the WWW. Most information on the Internet can be addressed with a URL.

A URL has four main components

  1. a protocol specifier, e.g. http, ftp, gopher, mailto, file etc
  2. a site/domain locator
  3. a file locator
  4. an optional within-file position locator
E.g.
http://www.cs.nott.ac.uk/~hla/HTF/proceedings.html#session2

If no within-file position locator is given, the position defaults to the top of the file.

E.g.

http://www7.conf.au/cfs.html
points to the top of a page.

The above example showed how to link to a specific position in another document.

To link to a specific position in the same document (i.e. source and destination are in the same document), the value assigned to HREF can leave out everything except the position identifier.

1 comment:

The Python said...

Interesting... I have almost forgotten all the techie stuff I had to learn in the early days!

However, it is useful to understand this stuff, even if one does have to actually do it.