search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Base Tutorial

Browser Support

Internet Explorer Firefox Opera Safari Chrome

The HTML base tag allows you to specify a default address or target for all links on a web page. It can be quite useful at times.

One use is to have all the links on a page open in a new window—although nowadays that could also mean the links open in a new tab, it just depends on how a person has their browser preferences set.

To have all links open in a new window (or tab) add the follow code to the HEAD section of your page:

<base target="_blank">

There is no closing tag. Another way to use the base tag is to point to your website root, like this:

<base href="http://www.boogiejack.com/">

I use that on my 404 page. A 404 page is an error page. When your browser tries to connect to a page that isn't there, most web servers will show the 404 error page instead (if there is one).

When the missing page is in another directory, the 404 page will show up minus the images, and other external files, such as an external style sheet, won't be called into action either . . . unless you include the base tag with a link to your website's root directory.

With the base website address in place, all your links and references to external files will work no matter which directory the 404 page is being called from—and happy days are here again!

Note that the base tag should be placed in the HEAD section of your page, before any references to other external files.

This concludes the HTML Base Tutorial.
Back | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Email:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)