Quackit Logo

FREE Hosting!

With every domain name you register with ZappyHost, you get FREE hosting.

PLUS you get:

  • FREE Website Builder
  • FREE Blog
  • FREE Starter Web Page
  • FREE Email Account
  • & much more! (Total value $123 for FREE!)
Get your FREE hosting today! >>

HTML base Tag

Print Version
 

The HTML base tag is used to specify a base URI, or URL, for relative links. For example, you can set the base URL once at the top of your page, then all subsequent relative links will use that URL as a starting point.

Example
<base href="http://www.quackit.com/javascript/" target="_blank"/>
<p>Learn about <a href="javascript_arrays.cfm">JavaScript Arrays</a></p>

The link above will actually resolve to http://www.quackit.com/javascript/javascript_arrays.cfm regardless of the URL of the current page. This is because the base URL (http://www.quackit.com/javascript/) is prepended to the (relative) URL indicated in the link (javascript_arrays.cfm)

Attributes:
Attributes specific to this tag:
AttributeDescription
hrefSpecifies the URI/URL to use.
Other Attributes:
AttributeDescription
targetTarget frame/window
Try it yourself! HTML Editor


Also see the complete list of HTML tags


Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!