Html Linking to Internal and External Pages


HTML Linking: Internal vs External

The anchor tag <a> in HTML enables hyperlink creation. Links can point to:

 

  • External pages (on other websites)
  • Internal pages (within your own site/project folder)

What is External Links?

This type of link directs users to another website or domain.

 

<a href="https://www.wikipedia.org" target="_blank">Visit Wikipedia</a>
  • href: Full URL of the site
  • target="_blank": Opens in a new tab

What is Internal Links?

Internal website links direct users to different sections of the same webpage or to separate HTML pages within the website.

 

<a href="about.html">About Us</a> 

notepad
  • Always use full URLs for external links
  • Maintaining a tidy internal file structure will allow you to create links more efficiently.
  • Use relative path formats like about.html or ../folder/page.html instead of absolute paths for internal site links.



OnlineTpoint is a website that is meant to offer basic knowledge, practice and learning materials. Though all the examples have been tested and verified, we cannot ensure the correctness or completeness of all the information on our website. All contents published on this website are subject to copyright and are owned by OnlineTpoint. By using this website, you agree that you have read and understood our Terms of Use, Cookie Policy and Privacy Policy.