May 03, 2021 HTML5
2. Label definition and instructions for use
4. The difference between HTML 4.01 and HTML5
Specify the default URL and default destination for all links on the page:
<head><base href="//statics.w3cschool.cn/images/w3c/" target="_blank"></head>
<body>
<img src="logo.png" width="24" height="39" alt="w3cschool">
<a href="logo.png">w3cschool logo</a>
</body>
Try it out . . .
All major browsers support the label.
The label specifies the default URL or default destination for all relative links on the page.
You can use up to one element in a document. The label must be inside the element.
Tip: Put the label in the position of the first element in the element so that other elements in the head area can use the information in the element.
Note: If you are using the label, you must have the href property or the target property or both properties.
No.
In HTML, the label does not have an end label.
In XHTML, the label must be turned off correctly.
Property | Value | Describe |
---|---|---|
Href | Url | Specifies the baseline URL for all relative links on the page. |
target |
_blank
_parent _self _top framename |
Specify where all hyperlinks and forms in the page open. The property is overwritten by the target property in each link. |
The label supports the global properties of HTML.
The label does not support any event properties.
HTML DOM Reference Manual: Base Object