html5 Site Icon CSS3 Site Icon CSS Site Icon

HTML4 Reference

HTML <base /> tag

Definition

The <base /> tag is a self closing tag that defines a base URL for the links on a page.

This tag is only allowed within the <head> </head> element.

Base URL

The base URL normally consists of the protocol being used, which in our case will be the HTTP protocal and the server name directory which for us will be htmldoctor.info/

This will give us a base URL of http://htmldoctor.info/

Relative URL

The common use of a relative URL is by omitting the protocol and server name as documents generally reside on the same server. So this would be directoryName/fileName.extension.

For example the relative URL images/chickenpiesmall.jpg

Absolute URL

An absolute URL is the complete address of the resource.

For example the absolute URL http://htmldoctor.info/images/chickenpiesmall.jpg

Example


<head>
  <title>HTML, CSS and JavaScript Tutorials - Intermediate HTML Tutorials</title>
  <base href="http://htmldoctor.info/" />
</head>
<body>
<h3>List OF Images</h3>
<dl>
  <dt>Pie Pictures</dt>
    <dd><img src="images/chickenpiesmall.jpg"
             alt="Chicken Pie" width="75" height="50" /> </dd> 
</dl>
</body>

relative URL "images/chickenpiesmall.jpg" is attached to the

base URL of http://htmldoctor.info/ giving us the

absolute URL http://htmldoctor.info/images/chickenpiesmall.jpg.

Required Attributes

NONE

Optional Attributes

target - used for frames - not mentioned further here.

href specifies a base URL for the links on a page.


  <base href="http://htmldoctor.info/" />

Common Attributes

NONE

Language Attributes

NONE

Document Event Attributes

NONE

Form Event Attributes

NONE

Image Event Attributes

NONE

Keyboard Event Attributes

NONE

Mouse Event Attributes

NONE



<b> tag    << Prev          Next >>   <basefont /> tag

go to home page Homepage go to top of page Top

HTML Elements

The complete set of HTML elements also known as HTML tags from the latest HTML 4.01 Specification.

Click the links for more information on individual tags and their attributes.

<!--...-->

<!DOCTYPE>

<a>

<abbr>

<acronym>

<address>

<applet>

<area />

<b>

<base />

<basefont />

<bdo>

<big>

<blockquote>

<body>

<br />

<button>

<caption>

<center>

<cite>

<code>

<col />

<colgroup>

<dd>

<del>

<dfn>

<dir>

<div>

<dl>

<dt>

<em>

<fieldset>

<font>

<form>

<frame />

<frameset>

<h1> - <h6>

<head>

<hr />

<html>

<i>

<iframe>

<img />

<input />

<ins>

<isindex />

<kbd>

<label>

<legend>

<li>

<link />

<map>

<menu>

<meta />

<noframes>

<noscript>

<object>

<ol>

<optgroup>

<option>

<p>

<param />

<pre>

<q>

<s>

<samp>

<script>

<select>

<small>

<span>

<strike>

<strong>

<style>

<sub>

<sup>

<table>

<tbody>

<td>

<textarea>

<tfoot>

<th>

<thead>

<title>

<tr>

<tt>

<u>

<ul>

<var>