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: //m.sbmmt.com/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 Fileon 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