How to Add a Link to Text HTML

How to Add a Link to Text HTML thumbnail
Hyperlinks let you navigate from one page to another by clicking the links.

Hyperlinks lie at the heart of Web pages and the World Wide Web itself. Without the ability to link from one page to another, Web pages would be a lot like plain text documents. Text links are known as "hyperlinks." To insert a link to a existing text in an HTML page, use HTML tags with the correct attributes and values. HTML links can take you to another Web page, email address or file.

Instructions

    • 1

      Open an HTML page. Use a Web page editor such as Adobe Dreamweaver. Click "File" and then click "Open." Locate the file on your hard drive and double-click it to open it.

    • 2

      Make sure you are in "Source code" or raw code view. You should be able to see the raw HTML code showing tags with arrows such as <head>, <title> and <font>. Scroll down the page until you find the text you want to add a link to. This is known as the "anchor text."

    • 3

      Insert the anchor codes. HTML tags usually come in pairs, an opening tag and a closing tag. For hyperlinks, the tags start as <a> and </a> respectively. Insert an opening tag before the anchor text, and a closing tag after the text, as follows: <a>Anchor Text</a>

    • 4

      Insert the hyperlink or destination attribute for the HTML anchor tag. The attribute for the hyperlink is "href" followed by an equal sign and quotes where you will add values later. So the code should now look like this: <a href="">Anchor Text</a>.

    • 5

      Enter a hyperlink in the code. The link can be a Web address, and usually begins with "http://" (without quotes), an email address starting with "mailto:" or other type of link. Insert the address between the quotes in the opening tag. This is the "value" of the "href" attribute." Put together, the code now looks like: <a href="http://mylink.com">Anchor Text</a>. If inserting a link to an email address, it should look like: <a href="mailto:example@address.com">Anchor Text</a>.

    • 6

      Save the file by clicking "File" and then "Save" or "Save As." Open the HTML page in a Web browser. You should now see the anchor text with a hyperlink in it. Hover the mouse over the hyperlink. When it changes to a hand with a pointing finger, click the link. If the link takes you to the intended destination, the code is correct.

Related Searches:

References

Resources

  • Photo Credit Internet hyperlink image by Star from Fotolia.com

Comments

You May Also Like

Related Ads

Featured