统一资源标识符
文法 > 例子

下图展示了一些 URI 示例及它们的组成部分。
<nowiki/>
          <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">userinfo</span>       <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 177, 17)">host</span>      <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">port</span>
          <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">┌──┴───┐</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 177, 17)">┌──────┴──────┐</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">┌┴┐</span>
  https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└─┬─┘</span>   <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(176, 0, 177)">└─────────────┬────────────┘</span><templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">└───────┬───────┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 178, 17)">└────────────┬────────────┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└┬┘</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>          <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(176, 0, 177)">authority</span>                  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>                  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 178, 17)"><templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 178, 17)">query</span></span>           <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">fragment</span>

  ldap://[2001:db8::7]/c=GB?objectClass?one
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└┬─┘</span>   <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(176, 0, 177)">└─────┬─────┘</span><templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">└─┬─┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 178, 17)">└──────┬──────┘</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>   <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(176, 0, 177)">authority</span>   <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>      <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 178, 17)">query</span>

  mailto:John.Doe@example.com
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└─┬──┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">└────┬─────────────┘</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>     <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>

  news:comp.infosystems.www.servers.unix
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└┬─┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">└─────────────┬─────────────────┘</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>            <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>

  tel:+1-816-555-1212
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└┬┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">└──────┬──────┘</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>    <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>

  telnet://192.0.2.16:80/
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└─┬──┘</span>   <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(176, 0, 177)">└─────┬─────┘</span><templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">│</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>     <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(176, 0, 177)">authority</span>  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>

  urn:oasis:names:specification:docbook:dtd:xml:4.1.2
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">└┬┘</span> <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">└──────────────────────┬──────────────────────┘</span>
  <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(178, 111, 0)">scheme</span>                    <templatestyles src="Template:Color/styles.css" /><span class="tmp-color" style="color:rgb(0, 76, 178)">path</span>