|Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects | Member Perks | Member Login|
HTML Base Tutorial
Browser SupportThe 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:
There is no closing tag. Another way to use the base tag is to point to your website root, like this:
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.
Check out SEO for YOU now!
Almost a NewsletterSubscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
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 ]
Home | Web Design Tutorials | Free Graphics | Newsletter | Products | Specials | SEO | Sound Effects