HTML URL
In this tutorial, I will be explaining to you everything you need to know about URL.
URL stands for Uniform Resource Locator
- URL can be referred to as a website address
- It comprises of either characters, numbers or IP (Internet Protocol) address.
- The main purpose of URL is to get the location of files, resources, documents: available on the internet.
URL Syntax
URL Syntax follows this particular order and arrangement.
scheme://host:port/path?query-string#fragment-id
SCHEME
This defines the type of internet protocol to be used (E.g. http, https, ftp and mailto). The scheme is followed by :// (a colon and two forward slashes).
SCHEME | DESCRIPTION |
---|---|
http |
Hypertext Transfer Protocol (Not encrypted web pages) |
https |
Secure Hypertext Transfer Protocol (Encrypted web pages) |
ftp |
File Transfer Protocol (For downloading and uploading files) |
file |
Document on your local storage device or on the internet. |
malto |
Used to directing uses to an email address |
HOST NAME
This is where the resource is located. It is made up of two parts: Prefix and Domain Name.
- Prefix - Host machine name (www)
- Domain Name - Name of the website (obintusacademy.com)
- Host name will now be: www.obintusacademy.com
PORT
This is the port number of the host.
- http - default port 80
- https - default port 443
PATH
This specifies a particular resource (web page, image, file or document, etc) within the host that the user wants to access. For example: coding/html/index
QUERY STRING
This contains data to be sent to a server-side script running on the web server. Query string comes after the question mark (?), which is usually name or value pairs separated by ampersand (&). For example: ?name=Daniel&country=Nigeria
FRAGMENT IDENTIFIER
This specifies a section within a particular page. The browser scrolls to that particular section immediately the page loads up. The fragment identifier is introduced by the hash character #.

SCHEME and HOST NAME are NOT case sensitive
PATH and QUERY STRINGS are case sensitive.

The URL is always displayed in lowercase.