NICE FAQ Script

PHP FAQ / Knowledgebase / Articles Script

  
Article Related Options
FAQ Home Refer To a Friend Add your comments Print this Article Post Query
Path information: the BASE element
<!ELEMENT BASE - O EMPTY               -- document base URI -->
<!ATTLIST BASE
  href        %URI;          #REQUIRED -- URI that acts as base URI --
  >

Start tag: required, End tag: forbidden

Attribute definitions

href = uri [CT]
This attribute specifies an absolute URI that acts as the base URI for resolving relative URIs.

Attributes defined elsewhere

In HTML, links and references to external images, applets, form-processing programs, style sheets, etc. are always specified by a URI. Relative URIs are resolved according to a base URI, which may come from a variety of sources. The BASE element allows authors to specify a document's base URI explicitly.

When present, the BASE element must appear in the HEAD section of an HTML document, before any element that refers to an external source. The path information specified by the BASE element only affects URIs in the document where the element appears.

For example, given the following BASE declaration and A declaration:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
 <HEAD>
   <TITLE>Our Products</TITLE>
   <BASE href="http://www.aviary.com/products/intro.html">
 </HEAD>

 <BODY>
   <P>Have you seen our <A href="../cages/birds.gif">Bird Cages</A>?
 </BODY>
</HTML>

the relative URI "../cages/birds.gif" would resolve to:

http://www.aviary.com/cages/birds.gif
 
 User Comments
   
There are no comments posted for this article. Click here to become first one to post a comment.
 
 
Additional Info
 
 
 Article # 652
 Posted on 19-11-2008
 Viewed 247 times
 
Save as HTML Save as HTML
Add as Favorites Add as Favorites
Notify on Update Notify on Update
 
 Attachments
 
 None
 
 
 Did this help you?
Yes 
No 
 
 
 Related Articles
 
 None
 
 
SHARE IT: