Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




<BASE ...>

Usage Recommendation
thumbs up use it

  • HREF: default address for hypertext links
  • TARGET: default window for linked documents

<BASE ...> tells the browser to pretend that the current page is located at some URL other than where the browser found it. Any relative reference will be calculated from the URL given by <BASE HREF="..."> instead of the actual URL. <BASE ...> goes in the <HEAD> section.

For example, consider a page whose URL is, and the full code of the page is this:

this code produces this
<TITLE>Example of the BASE Tag</TITLE>

<A HREF="index.html">go home</A>

this page

The <BASE ...> tag on this page tells the browser to pretend that the page is located at The link on the page makes a relative reference to "index.html". Instead of calculating the full URL of the link as, the link is calculated as

Generally it's best to avoid using <BASE ...>. It usually just restricts the ability to move a set of web pages from one location to another (say, from your computer where you are developing them to the server where they publicly reside). However, <BASE ...> can come in handy in development situations where the final version of the page will make relative references to resources that aren't on the development machine.

  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire