Links are one of the most used tags in XHTML, but if you don't know how to write one, you won't be able to move your readers from one part of your site to another. This quick tip will show you how to create a link using the a (or anchor) tag.
Time Required: 5 minutes
- As with all tags, start with the less-than sign:
- The name of the element is a - so that comes next:
- Since this is a link to something else (rather than an identifier for a location on the page), you should include the href attribute:
- Inside the href attribute, include the URL where the link should go to when you click on it:
- Close your starting tag with a greater-than sign:
- Then put the text or image you want to be clickable:
- Finally, close your link with a close anchor tag:
- It's good form (and follows the standard) to enclose your attributes in quotes, either single or double.