Links

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 anchor tag. The anchor tag is represented by the letter "a". Therefore, the syntax goes something like this anchor text.
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 (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.
Share on Google Plus

About Saroj Thapa Magar

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment