In HTML, links (also known as "Hyperlinks") are what enables visitors to click through to another web page (or other URL). The visitor usually clicks on linked text or a linked image and that's what triggers the loading of the linked document.

To create a link in HTML, you use the HTML <a> tag, also known as the "anchor" tag. The anchor tag is represented by the letter "a". Therefore, the syntax goes something like this <a href="...some URL...">anchor text</a>.

Here's an example:

Source CodeResult

Check out Rob Roy Glacier!

Open Link in New Window

If you want the page to open in a new window, you can add target="_blank" to your code. Like this:

Source CodeResult

Here's another glacier in New Zealand: Fox Glacier

Named Anchors

You can make the browser jump to a certain spot in the page by using a named anchor. To do this, you use the document URL, followed by a #, followed by the anchor name. The anchor name must exist somewhere in the target document. To place an anchor into the target document, use <a name="..."></a> (and replace ... with a name of your choice).

In the example below,

Source CodeResult

Jump down to My Named Anchor




My Named Anchor

Image Links

You can place the link code around an image too. This will link the image to the URL specified. Like this:

Source CodeResult
Photo of White Beach in Boracay, Philippines

HTML Link Generator

You can also use this HTML link generator to generate the HTML code for your hyperlinks.

About was created in order to provide HTML tools, codes, tutorials, and other resources to help webmasters create and maintain their HTML documents. aims primarily at beginners, but may also be useful to web professionals.

About the HTML Codes

The HTML codes on this website are provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

Need Hosting?

Our partner site HOSTEK provides website hosting, domain names and related products at some of the best prices on the web. If you need web hosting, check them out!