HTML <a> href attribute
Examples
href attribute specifies the destination address of the link:
<p>绝对路径 URL: <a href="http://www.w3big.com/">本教程</a></p>
<p>相对路径 URL: <a href="tag_a.php">a 标签</a></p>
<p>相对路径 URL: <a href="tag_a.php">a 标签</a></p>
try it"
Browser Support
All major browsers support the href attribute.
Definition and Usage
href attribute href tag used to specify the destination for the hyperlink URL.
If the href attribute is not specified links, <a> tag will not be a link.
The difference between HTML 4.01 and HTML5
In HTML5, if the label does not <a> href attribute, it will be a hyperlink placeholder.
grammar
<a href="URL">
Property Value
值 | 描述 |
---|---|
URL | 超链接的 URL。可能的值:
|
More examples
Use anchor URL
How to use the id to use anchor URL (HTML5 does not support name attribute).