The BASE element creates a URL reference point within the document, both for recording the document's own URL (to allow relative addressing of links within the document in situations when the document may be read out of context), but also other relative addresses to explicitly state a scope for resolving a group of relative links. This reduces the maintenance burden of moving a set of documents to a new location. BASE may reference either a location or a specific document, depending on context.
For example, defining a location for your image files allows them to be moved easily by merely changing the base address:
<BASE id="images" "http://foo.com/images>
...
<IMG SRC="next.GIF" base="images">
To insert a <BASE> element into your text, place the insertion point into your document, then choose the Define Base… command. The Base Utility is displayed, from where you can specify the URL (from the HREF popUp menu or by entering the URL directly) as well as the base id (optional). Choose the OK button to complete the command.
Note that the BASE element should only occur within the document Header (between <HEAD> and </HEAD>).
The default base address is the URL of the document itself.
Choosing the Define Base... command from the HyperText menu displays the Base Utility. Items within this dialog box are described below. For more information on creating a URL (Uniform Resource Locator), check out the Beginner's Guide section Linking to Other Documents.
Sample Base
Shows the constructed base tag as it will be inserted into the document.
Scheme (optional)
Either selected by the popUp menu or manually entered, this is the communication scheme of the file. Usually this will be "http:" for html files and directories.
Server (optional)
The server name as it is known on the Internet, such as "www.ncsa.edu". Clicking on the Server: button gives you the option of replacing the default server (as set on the Preferences card) with the displayed server name, or of using the default server.
Port (optional)
Most HTTP transmission defaults to port 80. If you've set up communications through a different port, enter that number here. Otherwise, leave this blank.
ID (optional)
This attribute is used as an identifier to define a named reference to the base URL. This name token must be unique within the document. Leaving off the ID attribute creates a default base element that should include the URL of the current document.
Include HREF= (required)
This is the URL referencing the directory or file. If this references a document that is not in the same directory as the current HTML document, prepend the relative path to the filename.
Note that the External File and Select Document commands under the HREF popUp menu will automatically attach the proper relative path to the URL if the server location has been defined (on the Preferences card) and the document's path/location is within or below the server's directory (folder).
For example, if the current document is "/project/document.html" (a document named "document.html" located in a "project" folder on your server) and you want to reference two HTML documents, one named "contents.html" in the same folder, the other named "conrad.html" located in a "conrad" folder in the "people" folder on your server "www.server.edu", the full anchor tags would look like:
The fragment-id is a reference to a named anchor within the target document, allowing browsers to scroll directly to the specific location within the document. The fragment-id is appended to the document name following a pound "#" sign, as in
<A HREF="contents.html#whatsNew">
Note
For compatibility with other systems, avoid using spaces or special characters in either your folder or document names.
Back to Structure submenu, back to HyperText menu, or return to Contents.