Home >> FAQs/Tutorials >> XHTML Tutorials and Tips >> Index
XHTML Tutorial - Structure of a URL
(Continued from previous topic...)
What Is the Structure of a URL?
The structure of a URL is defined by the URL specification,
see http://www.ietf.org/rfc/rfc2396.txt.
Generally, a URL consists of 7 parts:
- Protocol Name - Identifies the communication protocol through which this
resource is made available, like "http://" or "ftp://".
- Host Name - Identifies the computer host that manages this resource,
like "www.w3.org", or "dev.fyicenter.com".
- Port Number - Identifies the communication port where hosting computer is
taking requests, like ":8080".
- Path Name - Identifies the directory where the resource is located,
like "/", or "/faq/".
- File Name - Identifies the file name of the resource,
like "index.html", or "xanimal18.jpg".
- Bookmark - Identifies a bookmark within the target document, like "#narrow".
- Query String - Provides parameters to the resource manager, like "?hl=en&q=xhtml".
If you have a URL, you can easily break it into parts.
For example, "http://www.fyicenter.com:8080/faq/xhtml/index.html#footer?q=test"
can be broken into 7 parts like this:
- "http://" - Protocol Name.
- "www.fyicenter.com"- Host Name.
- ":8080" - Port Number.
- "/faq/xhtml/" - Path Name.
- "index.html" - File Name.
- "#footer" - Bookmark.
- "?q=test" - Query String.
(Continued on next topic...)
- What Are Hyper Links?
- What Is an Anchor "a" Tag/Element?
- How To Define a Hyper Link?
- How To Define a Bookmark?
- What Is a URL?
- What Is the Structure of a URL?
- What Happens If Protocol or Port Number Is Missing in a URL?
- What Happens If a URL Starts with Path or File name?
- What Is a Relative Path Name?
- What Happens If File Name is Missing in a URL?
- How To Build Hyper Link Indexes within the Same Document?
- What Happens If a Hyper Link Points to an Image?
- What Happens If a Hyper Link Points to a Music File?
- What Happens If a Hyper Link Points to a PDF File?
- What Happens If a Hyper Link Points to a ZIP File?
- How To Create A Link to Open a Document in a New Window?
|