How to HTML Links ?

You can create a link in an HTML page to another document, by using the HREF attribute. You can use HREF attribute to links within your own directory tree limit or you can links to external websites too.

Internal Links

When you link your pages within your own directory tree limit is called Internal Link. While a user browsing your website , the browser is already in your directory, then you can points links from the current directory and don ' t need to specify a full URL path.

consider a directory hierarchy like this

internal-link-external-link

If you are in HTML directory of mywebsite.com , and you want to link an html page tables/border.html from HTML directory you can code like this.

Here in this case you can avoid a full URL path like :

If all your html files are in the same directory , you can give just file name and extension in HREF attribute.

External Links

External links which link your pages to other web sites.

e.g. If you want to create an external link from your website to w3c.org help page, you can code like this:

In order to create an external link to another web site, you need to know the other web site URL with full path.