HTML Hyperlinks within a Web Page

 

Creating HTML Hyperlinks within a Web Page

The ANCHOR tag is used to create a hyperlink within a web page.
Links are created with an anchor, an href attribute and a URL (Uniform Resource Locator.)

HTML Link Types

There are three types of links:

Local
Internal
External
 

HTML Local Links

Local links are links to web pages within the same website. This type of link can be created using just the file name and extension or a complete web address.

HTML Code

<a href="yourpage.html">Text</a>

Edit the text in bold to suit your needs.

When linking to a web page within your web site in a different directory, you must include the directory name with your page name.

HTML Code

<a href="yourdirectory/yourpage.html">Text</a>

Edit the text in bold to suit your needs.

HTML Internal Links

Internal links are links to other areas within the same web page.

Links Select the area of text in which you want the link to take you to when clicked on. Create an anchor with this text by linking your text with the following code. You can change the “Anyname” text indicated in red to whatever you’d like.

HTML Code

<a name="Anyname">Text</a>

Edit the text in bold to suit your needs.

Links Create your main link that will be used to navigate to the anchor you just created. Make sure you use the same name you used within your anchor:

HTML Code

<a href="#Anyname">Click Here</a>

Edit the text in bold to suit your needs.

HTML External Links

External links are links to other web pages located on another server. This type of link MUST contain the complete URL.

HTML Code

<a href="http://www.domain.com">Link</a>

Edit the text in bold to suit your needs.

 

Give it a try…

To view the results below, after making changes to the above code, place your cursor at the end of the code and press your space bar on your keyboard.

Here’s the result…

This concludes the Creating HTML Hyperlinks within a Web Page code.
 

 

 
Visit the following pages for a wealth of copy and paste codes and tips:

HTML Tips
Copy and paste special effect HTML codes for your web page.

HTML Codes
An HTML codes chart you can use to copy and paste codes into your web page.

HTML Color Codes
An HTML color codes chart you can use to copy and paste color codes into your web page.

JavaScript Codes
Copy and paste special effect JavaScript codes for your web page.

Web Design Tips
Tips, tricks, and special effect codes for your web page.

HTML Tags
A list of HTML tags.

HTML 5 Tags
A list of the latest HTML tags to be developed.

ASCII Codes
Special text characters and code for your web page.