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

URL

Web浏览器通过使用URL从Web服务器请求页面。当我们点击页面上的一个链接时,该连接是一个指向web地址的a标签。

一个web地址如http://www.w3schools.com/html/default.asp的语法规则如下:

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

备注:

  • scheme - 定义互相网络服务的类型 (most common is http)
  • host - 定义域名主机 (default host for http is www)
  • domain - 定义域名(w3schools.com)
  • port - 定义虚拟主机上的端口号(default for http is 80)
  • path - 定义服务器上的地址(If omitted: the root directory of the site)
  • filename - 定义资源或者是文件的名字

常用的URL schema

Scheme

Short for

Used for

http

HyperText Transfer Protocol

Common web pages. Not encrypted

https

Secure HyperText Transfer Protocol

Secure web pages. Encrypted 加密

ftp

File Transfer Protocol

Downloading or uploading files

file


A file on your computer

URL Encoding

URLs can only be sent over the Internet using the ASCII character-set. If a URL contains characters outside the ASCII set, the URL has to be converted.

URL encoding converts non-ASCII characters into a format that can be transmitted over the Internet.

URL encoding replaces non-ASCII characters with a "%" followed by hexadecimal digits.

URLs cannot contain spaces. URL encoding normally replaces a space with a plus (+) sign, or %20.


HTML URL Encoding Reference

http://www.w3schools.com/tags/ref_urlencode.asp


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值