UK[be?s] 美[bes]

n. Base; basis; based on; base number (such as decimal 10 and binary 2)

vt. Based on; build... on ;Put... on or set up (base); put... on the base (or pedestal)

adj. despicable; low-level; cheap, inferior; commoner

Third person singular: bases Plural: bases Present participle: basing Past tense: based Past participle: based Comparative: baser Superlative: basest

html base tag syntax

What is the function of base tag in html?

Function: Specifies the default address or default target for all links on the page. It is a label that expresses the path and connection URL.

Note: Normally, the browser will extract the corresponding elements from the URL of the current document to fill in the blanks in the relative URL. This can be changed using the <base> tag. The browser will then no longer use the URL of the current document, but will use the specified base URL to resolve all relative URLs. This includes URLs in <a>, <img>, <link>, <form> tags.

Note: In HTML, the <base> tag does not have a closing tag; in XHTML, the <base> tag must be closed correctly. The <base> tag must be inside the head element.

html base tag example

<html>
<head>
    <base href="http://miracleart.cn/tpl/Index/Static/img/" />
    <base target="_blank" />
</head>

<body>
<img src="banner7.jpg" /><br />
<p>請注意,我們已經為圖像規(guī)定了一個相對地址。由于我們已經在 head 部分規(guī)定了一個基準 URL,瀏覽器將在如下地址尋找圖片:</p>
<p>"http://miracleart.cn/tpl/Index/Static/img/banner7.jpg"</p>

<br /><br />
<p><a href="http://miracleart.cn">php中文網</a></p>
<p>請注意,鏈接會在新窗口中打開,即使鏈接中沒有 target="_blank" 屬性。這是因為 base 元素的 target 屬性已經被設置為 "_blank" 了。</p>

</body>
</html>

Run instance ?

Click the "Run instance" button to view the online instance