Create a Website
HTML
Dreamweaver
CSS Tutorial
JavaScript
FREE Domain!
Any web hosting you subscribe with DotEasy will get you a FREE domain name registration.
PLUS you get:
  • FREE Website Builder
  • FREE Blog
  • FREE Forum
  • FREE Photo Album
  • FREE Email Accounts
Get your FREE domain name today!
Home > HTML Help & Tutorial
SSD Web Hosting with FREE Domain

URLs

HTML uses the <a> (anchor) tag to create links. When you make a link, you are making a clickable anchor text or image. When somebody click on this text or image, it will take them to another web page. Let's say that you wanted to make a link from your web page to Google. You would type:

<a href="http://www.google.com">Google</a>

The result is:

The targeted Attribute

With the targeted attribute, you can define how the linked web page will be opened. You can let the browser displays the linked web page in a new window with target="_blank" attribute.

For example, let's open the Google web page in a new browser window:
<a href="http://www.google.com/" target="_blank">Google</a>

The result is:

You can go ahead and try it if you want to.

Link to Specific Sections

Sometimes, you might want to have a link to take you to a specific section of another page. To do this, you need to do two things. The first, is to make the link, and the second, is to make where the link will lead to.

1) To make the actual link, think of a name for the certain spot. Let's say you are going to call it "spot". If this certain spot is on the same page that the link is, you would type:

<a href="#spot">Link to the spot section</a>

2) Now, you need to make where the link will take you. Go to the spot where you want the link to take you, and type:

<a name="spot"></a>

Mailto Links

Most people like to have a link on their web page that automatically sends e-mail to an address. If you want to do this, and your name is Dan, and your e-mail address is a@a.com, type:

<a href="mailto:a@a.com">Dan</a>

The result is:

Dan

Print this Page Link

Another popular feature you see on various sites is a link that allows you to print the web page. If you want to do this on your site, type:
<a href="javascript:window.print();">Print this page</a>

The result is:

Enjoy this tutorial?

1. Link to this page(copy/paste into your own website or blog):
2. Add this page to your favorite social bookmarks sites:
3. Add this page as your favorites. (Press Ctrl+D)