Hyperlinks in HTML
Hyperlink: also known as URL (Uniform Resource Locator), is the uniform resource locator. The general effect is that when we click on one place on the page, the page will automatically jump to another place.
General links follow the following requirements: s c h e me://host.domain:port/path/filename
For example, the website address of the W3C is h tt p://www.w3school.com.cn/html/index.asp. Let's 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 an 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 in the root directory of the website).
Filename-defines the name of the document / resource
Note: the service types defined by Scheme are:
A normal web page whose http Hypertext transfer Protocol begins with http://. No encryption.
Https secure Hypertext transfer Protocol secure web pages. Decrypt all information exchanges. For example, the URL of Alipay: https://www.alipay.com/
Ftp File transfer Protocol is used to download or upload files to a website.
File: files on your computer.
In fact, in web development, what we use is to define the path of the hyperlink.
1. Http link:
Baidu
Second, local links:
Picture
III. Ftp links
Enter
IV. Mailbox links
Finally, let's focus on the aiming link: usually click and jump to a place on the web page. For example, the link "go back to the top" on the page of Taobao
Define the anchor point: …
Link point:...
Of course, we can also go to other pages:
Define the aiming point: …
Link Anchor: …