HTML URL

URL (Uniform Resource Locator)
A thing called a URL (Uniform Resource Locator) is used to reference documents (or other data) on the World Wide Web. Addressing. A complete URL, for example: http://www.php.cn/html/lastpage.html, obeys the following syntax rules:

scheme://host.domain:port/path/filename

Scheme Defines the type of Internet service. The most popular type is http.

domain (domain) defines the Internet domain name, such as: w3school.com.cn.

host defines the host in this domain. If omitted, the default http-enabled host is www.

:port (port) defines the port number of the host. The port number is usually omitted. The default port number is 80.

path (path) defines the path on the server (an auxiliary path). If the path is omitted, the resource (document) will be located in the root directory of the website.

filename (filename) defines the name of the document. The default file name is usually default.asp or index.html, or other file names set by the WEB server.

Editor's note: The full English name of URL is Uniform Resource Locator, which is also translated as "Uniform Resource Locator" in Chinese.

URL Schemes

Here are some of the most popular schemes:

Schemes access
file files on your local PC.
ftp Files on the FTP server.
http Files on the World Wide Web server.
gopher Files on the Gopher server.
news Usenet news group.
telnet Telnet connection.
WAIS File on the WAIS server.

Accessing the newsgroup

The following HTML code creates a link to the newsgroup:

HTML Newsgroup This link is displayed as follows: HTML Newsgroup

Use FTP to download

The following HTML code creates a link to download the file:

Download WinZip This link appears as follows: Download WinZip

(This link does not work, it is just an example, so no need to try it. We do not provide an FTP directory.)

Link to email system

The following HTML code creates a link to your email system:

someone@html.comThis link displays As follows: someone@html.com

URL encoding example

1007.png

Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8">  <title>php.cn</title> </head> <body> <p>这个链接是无法工作的,它仅仅是个例子。</P> <br> <a href="ftp://www.php.cn/ftp/winzip.exe">Download WinZip</a> </body> </html>
submitReset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!