HTML URL

HTML Uniform Resource Locators

URL is a web page address.

The URL can consist of letters, such as "W3CSchools.cc", or an Internet Protocol (IP) address: 192.68.20.50. Most people use the domain name to access a website because names are easier to remember than numbers.


URL - Uniform Resource Locator

A web browser requests a page from a web server via a URL.

When you click a link in an HTML page, the corresponding tag points to an address on the World Wide Web.

A Uniform Resource Locator (URL) used to locate documents on the World Wide Web.

An example of a web page address://m.sbmmt.com/html/html-url.html

Grammar rules

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

Description:

  • 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, e.g. w3cschool.cc

  • :port - Define the port number on the host (the default port number for http is 80)

  • path - Define the port number on the server The path to (if omitted, the document must be located in the root directory of the website).

  • filename - defines the name of the document/resource


Common URL Schemes

The following are some URL schemes:


URL Character Encoding

URL can only use theASCIIcharacter set.

to pass through the Internet to send. Because URLs often contain characters outside the ASCII set, the URL must be converted to valid ASCII format.

URL encoding uses "%" followed by two hexadecimal digits to replace non-ASCII characters.

URL cannot contain spaces. URL encoding usually uses + to replace spaces.


URL encoding example

## http Hypertext Transfer Protocol Starts with http:// Ordinary web page. No encryption. https Secure Hypertext Transfer Protocol Secure web page, encrypts all information exchanged. ftp File Transfer Protocol is used to download or upload files to the website. file A file on your computer.
chemes Visit Used for

## ## £ %A3 © %A9 %AE
##Characters URL Encoding
## ®
## ## %C1 %C2 %C3 ## Ä
À %C0
Á
Â
Ã
%C4
Å For a complete URL encoding reference, please visit our URL Encoding Reference Manual.
%C5


Continuing Learning

||
php中文网(php.cn)

HTML 统一资源定位器(Uniform Resource Locators)

submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!