HTML Uniform Resource Locator
Uniform Resource Locator(URL)
URL Schemes
Using Links
Uniform Resource Locator
is used to address a document on the world wide web.
when you click on a link in HTML document, an underlying <a> tag points to a place on the web with an href attribute value.
<a href="lastpage.htm">last page</a>
The lastpage.htm link in the example is a link that is relative to the website that you are browsing, and your browser will construct a full web address to access the page
http://www.w3schools.com/html/lastpage.htm
A full web address follows these syntax rules:
scheme://host.domain:port/path/filename
the scheme is defining the type of internet service.
the most common type is http.
the domain is defining the internet domain name like w3schools.com
the host is defining the domine host.
if omitted, the defult host for http is www.
The :port is defining the port number at the host.
the port number is normally omitted.
the defult port number for http is:80.
the path is defining a path at the server.
if the path is omitted, te resource must be located at the root directory of the web site.
the filename is defining the name of a document.
the defult filename might be defult.asp, index.html, or something else depending on the setting of the web server.
URL Schemes
Schemes Access
file a file on your local PC
ftp a file on an FTP server
http a file on a world wide web server
gopher a file on a Gopher server
news a usenet newsgroup
telnet a telnet connection
WAIS a file on a WAIS server
Accessing a Newsgroup
<a href="news:alt.html">HTML Newsgroup</a>
creates a link to a news directory
Downloading with FTP
<a href="ftp://www.w3schools.com/ftp/winzip.exe">downloadwinzip</a>
creates a FTP directory
Link to your mail system
<a href="mailto:someone@w3schools.com">someone@w3schools.com</a>
Using Links
<html>
<body>
<p><a href="news:alt.html">HTML Newsgroup</a></p>
<p><a href="ftp://www.w3schools.com/ftp/winzip.exe">Download Winzip</a></p>
<p><a href="mailto:someone@w3schools.com">someone@w3schools.com</a></p>
</body>
</html>
Uniform Resource Locator(URL)
URL Schemes
Using Links
Uniform Resource Locator
is used to address a document on the world wide web.
when you click on a link in HTML document, an underlying <a> tag points to a place on the web with an href attribute value.
<a href="lastpage.htm">last page</a>
The lastpage.htm link in the example is a link that is relative to the website that you are browsing, and your browser will construct a full web address to access the page
http://www.w3schools.com/html/lastpage.htm
A full web address follows these syntax rules:
scheme://host.domain:port/path/filename
the scheme is defining the type of internet service.
the most common type is http.
the domain is defining the internet domain name like w3schools.com
the host is defining the domine host.
if omitted, the defult host for http is www.
The :port is defining the port number at the host.
the port number is normally omitted.
the defult port number for http is:80.
the path is defining a path at the server.
if the path is omitted, te resource must be located at the root directory of the web site.
the filename is defining the name of a document.
the defult filename might be defult.asp, index.html, or something else depending on the setting of the web server.
URL Schemes
Schemes Access
file a file on your local PC
ftp a file on an FTP server
http a file on a world wide web server
gopher a file on a Gopher server
news a usenet newsgroup
telnet a telnet connection
WAIS a file on a WAIS server
Accessing a Newsgroup
<a href="news:alt.html">HTML Newsgroup</a>
creates a link to a news directory
Downloading with FTP
<a href="ftp://www.w3schools.com/ftp/winzip.exe">downloadwinzip</a>
creates a FTP directory
Link to your mail system
<a href="mailto:someone@w3schools.com">someone@w3schools.com</a>
Using Links
<html>
<body>
<p><a href="news:alt.html">HTML Newsgroup</a></p>
<p><a href="ftp://www.w3schools.com/ftp/winzip.exe">Download Winzip</a></p>
<p><a href="mailto:someone@w3schools.com">someone@w3schools.com</a></p>
</body>
</html>
No comments:
Post a Comment