How to Link Text to HTML
HTML links or hyperlinks are used to enable redirection to another HTML document or area by clicking on the link object. The objects can any number of items, including images and text. Basic HTML links are created by surrounding the object with the HTML "<a>" tag. Enable your website visitors to access another HTML page from your Web page by including a text link.
Instructions
-
-
1
Open your HTML document in a text or HTML editor. Locate the area where you want to place your text link.
-
2
Type the text you want to display, surrounded by the "<a>" tag. Include the HTML location for your link within the "href" attribute. To display the text "My Text Link" linked to another HTML page, use: <a href="anotherHTMLPage.html">My Text Link</a>.
-
-
3
Type "target="_blank"" to indicate that the document should be opened in another blank window or tab. This is useful when you want the visitor to maintain access to your website while viewing the linked page information. Insert the target code in the same tags as the other page information: <a href="anotherHTMLPage.html" target="_blank">My Text Link</a>.
-
1
Tips & Warnings
To display the text link but linked to another website instead of an HTML document, use: <a href="http://www.anotherwebsite.com">My Text Link</a>.
References
- Photo Credit Comstock Images/Comstock/Getty Images