You are here:About>Computing & Technology>Web Design / HTML> HTML and XHTML> Beginning HTML Tutorials> Use the A Tag to Create a Link on Your Web Page
About.comWeb Design / HTML

How To Create a Link on Your Web Page

From Jennifer Kyrnin,
Your Guide to Web Design / HTML.
FREE Newsletter. Sign Up Now!
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.
Difficulty: Easy
Time Required: 5 minutes

Here's How:

  1. As with all tags, start with the less-than sign:
    <
  2. The name of the element is a - so that comes next:
    <a
  3. Since this is a link to something else (rather than an identifier for a location on the page), you should include the href attribute:
    <a href=""
  4. Inside the href attribute, include the URL where the link should go to when you click on it:
    <a href="http://webdesign.about.com/"
  5. Close your starting tag with a greater-than sign:
    <a href="http://webdesign.about.com/">
  6. Then put the text or image you want to be clickable:
    <a href="http://webdesign.about.com/">Learn Web Design
  7. Finally, close your link with a close anchor tag:
    <a href="http://webdesign.about.com/">Learn Web Design</a>

Tips:

  1. It's good form (and follows the standard) to enclose your attributes in quotes, either single or double.
 All Topics | Email Article | Print this Page | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.