...< /a>", where the most important attribute of the element is the href attribute, which indicates the target of the link."/> ...< /a>", where the most important attribute of the element is the href attribute, which indicates the target of the link.">

Home >Web Front-end >Front-end Q&A >How to set html hyperlink

How to set html hyperlink

藏色散人
藏色散人Original
2021-04-29 11:18:246636browse

In HTML, you can set a hyperlink through the tag. This tag can define a hyperlink, which is used to link from one page to another. The syntax is such as "...", where the most important attribute of the element is the href attribute, which indicates the target of the link.

How to set html hyperlink

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

tag defines a hyperlink, 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.

In all browsers, the default appearance of the link is:

How to set html hyperlink

Tip: If you do not use the href attribute, you cannot use the following attributes: download, hreflang, media, rel, target and type attributes.

Tip: The linked page is usually displayed in the current browser window, unless you specify another target (target attribute).

Tip: Please use CSS to style the link.

Example:

Hyperlink pointing to php.cn:

<a href="//m.sbmmt.com">php.cn</a>

For more detailed HTML/CSS knowledge, please visitHTML Video tutorial column!

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

Statement:
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
Previous article:Is html a picture?Next article:Is html a picture?