Home / Learn HTML / How the Web and Browsers Work
How the Web and Browsers Work
Before writing code, see what happens when you open a web page. It makes everything else easier.
Definition
The World Wide Web is a system of pages stored on computers called servers and viewed on clients (your browser). They talk using HTTP or the secure HTTPS. HTML is only the format of the page that travels.
- URL: the full address of a resource.
- Domain name: the readable name (xtoolmint.com), turned into an IP number by DNS.
- Request and response: the browser asks, the server answers with a file and a status code (200 OK, 404 Not found, 500 error).
- Hosting: the service that keeps your files on a server.
Theory in plain words
What it is
The web works by browsers asking servers for files. HTML, CSS, JavaScript and images travel over HTTP or HTTPS.
Why we use it
Knowing the path of a page helps you fix slow pages, broken links and caching problems.
How it works
You type a URL, DNS finds the server address, the browser sends a request, the server answers with HTML and the browser draws it, asking for more files as needed.
Where it is used
- Debugging 404 and slow loads
- Choosing hosting and CDN
- SEO and speed work
The journey of a web page
- You type
xtoolmint.comin the address bar. - The browser finds the server with that name (DNS).
- The browser asks the server: "send me the page".
- The server sends an HTML file.
- The browser reads the HTML, then asks for the CSS, images and scripts it mentions.
- The browser draws the page for you.
Parts of a web address (URL)
| Part | Example | Meaning |
|---|---|---|
| Protocol | https:// | How to talk. https is secure. |
| Domain | xtoolmint.com | The server name |
| Path | /merge-pdf | Which page |
| Query | ?lang=en | Extra information |
| Fragment | #top | A place inside the page |
Browsers fix many mistakes. Still, write clean code.
Quick quiz
1. What sends the HTML file to your browser?
A web server answers the request with the page.
2. In https://xtoolmint.com/merge-pdf which part is the path?
The path says which page you want.
3. What does the browser do with HTML?
The browser turns tags into what you see.
Common questions
What sends the HTML file to your browser?
A server. A web server answers the request with the page.
In https://xtoolmint.com/merge-pdf which part is the path?
/merge-pdf. The path says which page you want.
What does the browser do with HTML?
Reads the tags and draws the page. The browser turns tags into what you see.