Home  >  Article  >  Web Front-end  >  A detailed introduction to hyperlinks in HTML

A detailed introduction to hyperlinks in HTML

黄舟
黄舟Original
2017-05-27 14:11:412994browse

Hyperlink: Also called URL (Uniform Resource Locator), which is the Uniform Resource Locator. The general effect is that when we click somewhere on the web page, the web page will automatically jump to another place.

General links follow the following requirements: host.domain:port/path/filename

For example, the W3C website address is: www.w3school.com.cn/html/index.asp. We explain each of the above words as follows:

scheme - defines the type of Internet service. The most common type is http
Host - defines the domain host (the default host for http is www)
domain - defines the Internet domain name, such as w3school.com.cn
:port - defines the port number on the host ( The default port number for http is 80)
Path - defines the path on the server (if omitted, the document must be located in the root directory of the website).
Filename - defines the name of the document/resource

Note: The service type defined by Scheme is:
http Hypertext Transfer Protocol An ordinary web page starting with http://. No encryption.
  https Hypertext Transfer Protocol Secure Web Page. Decrypt all information exchanged. For example, Alipay's website address: https://www.alipay.com/
FTP file transfer protocol is used to download or upload files to the website.
  file: File on the computer.

In fact, in web development, what we use is ee7959cc8dd4be16ef633321c03dac325db79b134e9f6b82c0b36e0489ee08ed to define the path of the hyperlink

1. http link:

<a href=http://www.baidu.com>百度</a>

2. Local link:

<a href=file:///e/images/pic.jpg>图片</a>

3. FTP link

<a href=ftp://192.168.4.21/>进入</a>

4. Email link

<a href=mailto:bnbbs@163.com>E-MAIL</a>

Finally, let’s focus on the aim link: it is generally a place on the web page that jumps to after clicking. For example, the link "Return to Top" on the Taobao website page

Define anchor point: 56ead98a2d9d04e080309f49e606545f...5db79b134e9f6b82c0b36e0489ee08ed
Link point: 608c3021eadfb13747bc3acf322238d5...5db79b134e9f6b82c0b36e0489ee08ed

Of course, we can also go to other pages:

Define the aiming point: 7be851b018c8e362e2950735a5f358e3…5db79b134e9f6b82c0b36e0489ee08ed
Link anchor: 040d7b792c2c1cef644431783b3dbdeb…5db79b134e9f6b82c0b36e0489ee08ed

The above is the detailed content of A detailed introduction to hyperlinks in HTML. 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