Home > Web Front-end > HTML Tutorial > How to use html a tag

How to use html a tag

藏色散人
Release: 2019-05-25 11:30:27
Original
3483 people have browsed it

html The a tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the element is the href attribute, which indicates the target of the link.

How to use html a tag

#html How to use a tag?

Function: tag defines a hyperlink, used to link from one page to another.

Description:

The most important attribute of the element is the href attribute, which indicates the target of the link. The default appearance of links in all browsers is that unvisited links are underlined and blue, and visited links are underlined and purple. Active links are underlined and red

Note:

If you do not use the href attribute, you cannot use the following attributes: download, hreflang, media, rel, target and type attributes. The linked page usually displays in the current browser window, unless you specify another target (target attribute). Please use CSS to style the link.

html a tag example 1

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="http://www.php.cn">php中文网</a>
</body>
</html>
Copy after login

The effect is like:

How to use html a tag

# #html a tag example 2

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href=" target="_blank" >百度</a>
</body>
</html>
Copy after login
The effect is as follows:

How to use html a tag

The above is the detailed content of How to use html a tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template