In HTML, a link, also called a hyperlink, refers to a connection relationship from a web page to a target. The target can be another web page or a different location on the same web page. The a tag is used to set a hyperlink in HTML, with the syntax "...".
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
A link, also known as a hyperlink, is essentially part of a web page. It is an element that allows us to connect to other web pages or sites. Only when various web pages are linked together can a website be truly formed.
Hyperlink refers to the connection relationship from a web page to a target. The target can be another web page, a different location on the same web page, or a picture, file, etc. The object used for hyperlinks in a web page can be a piece of text or an image.
When the viewer clicks on the linked text or image, the link target will be displayed on the browser and opened or run based on the type of target.
In html, use the a tag to set hyperlinks.
Syntax
<a href="所指向的目标url">链接内容</a>
The href attribute describes the target of the link. .
Link content can be text, images, or other HTML elements.
Example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <a href="https://www.php.cn/">访问php中文网</a> </body> </html>
Recommended tutorial: "html video tutorial"
The above is the detailed content of What is a link in html. For more information, please follow other related articles on the PHP Chinese website!