5.URL

1.URL(Uniform Resource Locators)

URL可以由字母组成,如"W3CSchools.cc",

或互联网协议(IP)地址: 192.68.20.50。

大多数人进入网站使用网站域名来访问,因为 名字比数字更容易记住。

2.一个网页地址实例: //www.w3cschool.cn/html/html-tutorial.html 语法规则:

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

说明:

    • scheme - 定义因特网服务的类型。最常见的类型是 http

    • host - 定义域主机(http 的默认主机是 www)

    • domain - 定义因特网域名,比如 w3cschool.cn

    • :port - 定义主机上的端口号(http 的默认端口号是 80)

    • path - 定义服务器上的路径(如果省略,则文档必须位于网站的根目录中)。

    • filename - 定义文档/资源的名称

      以下是一些URL scheme:

      Scheme访问用于...
      http 超文本传输协议 以 http:// 开头的普通网页。不加密。
      https 安全超文本传输协议 安全网页,加密所有信息交换。
      ftp 文件传输协议 用于将文件下载或上传至网站。
      file   您计算机上的文件。

      3.URL 字符编码

      URL 只能使用 ASCII 字符集

      URL 编码会将字符转换为可通过因特网传输的格式。来通过因特网进行发送,由于 URL 常常会包含 ASCII 集合之外的字符,URL 必须转换为有效的 ASCII 格式。

      URL 编码使用 "%" 其后跟随两位的十六进制数来替换非 ASCII 字符。

      URL 不能包含空格。URL 编码通常使用 + 来替换空格。

      4.ASCII 字符集

      ASCII ,它的全称是"美国信息交换标准代码"。它设计于60年代早期,是计算机和诸如打印机、磁带驱动器之类的硬件设备的标准字符集。

      ASCII 是 7 比特字符集,包含了 128 个不同的字符值。

      ASCII 支持 0-9 的数字,A-Z大写和小写英文字母,以及一些特殊字符。

      被广泛使用于现代计算机、HTML和因特网上的字符集都是基于 ASCII 。

      以下表格列举了128个 ASCII 字符以及对应的 HTML 实体编码。

    • 1)

      ASCII 可印刷字符

      字符集编号描述
        32 空格
      ! 33 exclamation mark
      " 34 quotation mark
      # 35 number sign
      $ 36 dollar sign
      % 37 percent sign
      & 38 ampersand
      ' 39 apostrophe
      ( 40 left parenthesis
      ) 41 right parenthesis
      * 42 asterisk
      + 43 plus sign
      , 44 comma
      - 45 hyphen
      . 46 period
      / 47 slash
      0 48 digit 0
      1 49 digit 1
      2 50 digit 2
      3 51 digit 3
      4 52 digit 4
      5 53 digit 5
      6 54 digit 6
      7 55 digit 7
      8 56 digit 8
      9 57 digit 9
      : 58 colon
        59 semicolon
      < 60 less-than
      = 61 equals-to
      > 62 greater-than
      ? 63 question mark
      @ 64 at sign
      A 65 uppercase A
      B 66 uppercase B
      C 67 uppercase C
      D 68 uppercase D
      E 69 uppercase E
      F 70 uppercase F
      G 71 uppercase G
      H 72 uppercase H
      I 73 uppercase I
      J 74 uppercase J
      K 75 uppercase K
      L 76 uppercase L
      M 77 uppercase M
      N 78 uppercase N
      O 79 uppercase O
      P 80 uppercase P
      Q 81 uppercase Q
      R 82 uppercase R
      S 83 uppercase S
      T 84 uppercase T
      U 85 uppercase U
      V 86 uppercase V
      W 87 uppercase W
      X 88 uppercase X
      Y 89 uppercase Y
      Z 90 uppercase Z
      [ 91 left square bracket
      92 backslash
      ] 93 right square bracket
      ^ 94 caret
      _ 95 underscore
      ` 96 grave accent
      a 97 lowercase a
      b 98 lowercase b
      c 99 lowercase c
      d 100 lowercase d
      e 101 lowercase e
      f 102 lowercase f
      g 103 lowercase g
      h 104 lowercase h
      i 105 lowercase i
      j 106 lowercase j
      k 107 lowercase k
      l 108 lowercase l
      m 109 lowercase m
      n 110 lowercase n
      o 111 lowercase o
      p 112 lowercase p
      q 113 lowercase q
      r 114 lowercase r
      s 115 lowercase s
      t 116 lowercase t
      u 117 lowercase u
      v 118 lowercase v
      w 119 lowercase w
      x 120 lowercase x
      y 121 lowercase y
      z 122 lowercase z
      { 123 left curly brace
      | 124 vertical bar
      } 125 right curly brace
      ~ 126 tilde

      2)ASCII 设备控制字符

      ASCII 设备控制字符最初被设计为用来控制诸如打印机和磁带驱动器之类的硬件设备。

      在HTML文档中这些代码不会起任何作用。

       字符编号描述
      NUL 00 null character
      SOH 01 start of header
      STX 02 start of text
      ETX 03 end of text
      EOT 04 end of transmission
      ENQ 05 enquiry
      ACK 06 acknowledge
      BEL 07 bell (ring)
      BS 08 backspace
      HT 09 horizontal tab
      LF 10 line feed
      VT 11 vertical tab
      FF 12 form feed
      CR 13 carriage return
      SO 14 shift out
      SI 15 shift in
      DLE 16 data link escape
      DC1 17 device control 1
      DC2 18 device control 2
      DC3 19 device control 3
      DC4 20 device control 4
      NAK 21 negative acknowledge
      SYN 22 synchronize
      ETB 23 end transmission block
      CAN 24 cancel
      EM 25 end of medium
      SUB 26 substitute
      ESC 27 escape
      FS 28 file separator
      GS 29 group separator
      RS 30 record separator
      US 31 unit separator
           
      DEL 127 delete (rubout)
原文地址:https://www.cnblogs.com/lukelook/p/9233892.html