Versión en español



 


HTML base tag


Note: If you don't know what a tag is and/or how you must use it we recommend you to read our HTML tags and attributes tutorial that you can find in our HTML tutorials section.

Table of contents


Description

The HTML base tag sets the base URI that will be used to resolve relative URIs in all the document. By using the "target" attribute you can also define a default target for all the links in the document.

Supose that this code is in a document located in http://www.htmlquick.com/. As we are going to show a number of images that resides in the "images" folder, we may use the HTML base tag as following:

Code begin <html>
<head>
<base href="http://www.htmlquick.com/images/" target="_blank">
</head>
<body>
<img src="1.gif" />
<img src="2.gif" />
<img src="3.gif" />
</body>
</html>Code end


Attributes

href (uri)

Specifies an absolute URI as a base to resolve all the relative URIs in the document. Must be defined in the head section.

target (frame-target)

Specifies the name of the frame where the destination document should be loaded. Refer to the frame-target type definition for further information.

Code begin Open in a new window: <a href="http://www.w3c.org" target="_blank">WWW Consortium</a>
Open in a frame named "content" (frame must be present in the actual frameset): <a href="http://www.w3c.org" target="content">WWW Consortium</a>Code end


Events

There are no events defined for this tag.

See complete list and information about events in HTML




Bypass footer options  |   Send to a friend Send to a friend  |  Post to del.icio.us Post to del.icio.us

Digg this page Digg this!  |  File on Furl File on Furl  |  Add to Yahoo! MyWeb Add to Yahoo! MyWeb

Bypass W3C declarations | 

Valid XHTML 1.0 Strict  |  Valid CSS Why should you trust us? Click the images on the left to see how seriously we write our own pages, then make your choice.

Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0. This website gives its best effort to achieve the Level Triple-A Conformance, W3C-WAI Web Content Accessibility Guidelines 1.0. If you find any detail or error that we didn't see, don't hesitate and let us know.

The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. -- Tim Berners-Lee, W3C Director and inventor of the World Wide Web.

 Link to us  |  Contact us  |  Beyond HTML  |  Tools and resources  |  Sitemap  |  Webmaster