We can set the target of the link, so that we can click to jump to where we want to go.
The href attribute of the <a> tag is used to specify the URL of the hyperlink target.
The <a> tag that is added to the page, the browser is displayed with a special effect so that the user knows it is a hyperlink that can be linked to another document.
Look at the code:
<! DOCTYPE html>
<meta charset= "UTF-8" >
<title></title>
<body>
</body>
The page is like this:
You'll find that there's a <a> tag in the code, so what about a tag? Look at the following, you know ~
When we visit the Web page, we see a lot of links. For example, Baidu search for things, you will see a lot of search results links, click on those links will jump to other pages.
Use <a> tags to define hyperlinks in HTML to link to another page from one page.
The most important attribute of the <a> tag is the [href] attribute, which indicates the target of the link, which is the link mentioned above.
In all browsers, the default appearance of the link is:
- Links that have not been accessed are underlined and are blue
- Links that have been visited are underlined and are purple
- Active links are underlined and red (active links are state when clicked)
HTML&CSS Basic Learning Note 1.10-Adding links