w3schools
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
BEST WEB HOSTING JustHosts

HTML 5 Reference

HTML 5 Tags
HTML 5 Attributes
HTML 5 Events

HTML 5 Tags

<!-->
<!DOCTYPE>
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdo>
<big>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<datalist>
<dd>
<del>
<details>
<dfn>
<dir>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1> - <h6>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<keygen>
<kbd>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<tt>
<u>
<ul>
<var>
<video>
<xmp>

HTML 5 <base> Tag


Example

Specify a default URL and a default target for all links on a page:

<head>
<base href="http://www.w3schools.com/css/" target="_blank" />
</head>

<body>
<a href="default.asp">W3Schools' CSS Tutorial</a>
</body>

Try it yourself »

Definition and Usage

The <base> tag specifies a default URL, and/or a default target, for all elements with a URL (hyperlinks, images, forms, etc.).

The <base> tag must go inside the head element.


Differences Between HTML 4.01 and HTML 5

None


Tips and Notes

Tip: Put the <base> tag as the first element in the head element, so that other elements in the head section uses the information from the <base> element.

Note: Maximum one <base> element in a document.


Attributes

Attribute Value Description
href URL Specifies the URL to use as the base URL for links in the page
target _blank
_parent
_self
_top
Where to open all the links on the page. This attribute can be overridden by using the target attribute in each link.
  • _blank - all the links will open in new windows
  • _self - all the links will open in the same frame they where clicked
  • _parent - all the links will open in the parent frameset
  • _top - all the links will open in the full body of the window

Standard Attributes and Events

NONE



WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
Top Web Hosting
Cheap UK Web Hosting
WEB BUILDING
XML Editor – Free Trial!
FREE Flash Website
FREE Web Templates
SEO Company
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
SHARE THIS PAGE