Beginning Web Programming - Code Examples

Back to main book index

Chapter 2: Links and Navigation

Here are the examples for Chapter 2, which looks at how to create hypertext links.

Basic Links

ch02-eg01.htmlCreating a basic link to a page in the same folder using the <a> element
ch02-eg02.htmlCreating a link to an external Web site
ch02-eg03.htmlA link with a title attribute, which displays a tootlip when you hover over the link
ch02-eg04.htmlA link with white space (demonstration of a bad practice)
ch02-eg05.htmlA link to send an email
ch02-eg06.htmlLinking to a specific part of a page using the name attribute
ch02-eg07.htmlLinking to a specific part of a page using the id attribute
Try it outWrox Cafe Menu Example

Exercise

Exercise 1