The internet is built on 3 pillars: HTML, which is used to make web pages; HTTP which is used to send and receive information over the internet; and the URL.
scheme: [ // [ userinfo@ ] host [ :port ] ] [ / ] [ path ] [ ?query ] [#fragment ]
- Scheme is the protocol. In most cases it is either HTTP or HTTPS. It tells the browser what protocol to use to fetch the requested resource
- User-info substring is optional. The substring is of the format username:password.
- Host consists of the domain name. The web browser uses it to fetch the IP address that is hosting the web site. A DNS behaves like a look-up table to fetch the right IP address for the domain name.
- Port number indicates which gate to use to communicate with the web server.
- Path resolves a file within the web server.
- Query is an essential component for dynamic web pages, which use this query to dynamically render a web page.
- Fragment is a way to mark pages within an HTML page.