1. How the Web Works & Semantic HTML5
How the Web Works: URLs, DNS, HTTP & Browsers
Understand what happens behind the scenes when you type a website URL: IP addresses, DNS lookups, HTTPS requests and responses, status codes, and how browsers turn code into pixels.
- Trace the journey from typing a URL to seeing a rendered page in your browser
- Read the parts of a URL, HTTP request methods (GET vs POST), and status codes
- Understand how browsers parse HTML, CSS, and JavaScript into a live page
Before writing a single tag of HTML, it helps to know where your website files actually live and how they travel across the world onto someone's phone screen in half a second.
Every time you click a link or type an address into Chrome, Safari, or Firefox, a quiet conversation happens between two computers:
- The Client: Your browser (running on your laptop or phone). It asks for pages and draws them on screen.
- The Server: Another computer sitting in a data center that stores the website's files, images, and database records, waiting to answer requests 24/7.
What Happens When You Type a Website URL?
Suppose you visit https://yadavacademy.com/courses?level=beginner. Four fast steps turn that text into a glowing page on your screen:
- DNS Lookup (The Internet's Phonebook): Computers find each other using numeric IP addresses (like
142.250.190.46), not English domain names. Your browser asks a DNS (Domain Name System) server: "What IP address belongs toyadavacademy.com?" - Secure Connection (TCP + TLS/HTTPS): Your browser connects to that server IP and performs an encrypted handshake (
https://) so nobody on public Wi-Fi can spy on passwords or form submissions. - HTTP Request & Response: Your browser sends an HTTP Request asking for
/courses?level=beginner. The server runs its logic and sends back an HTTP Response containing HTML code, a status code (200 OK), and headers. - Browser Rendering Pipeline: The browser reads the HTML top-to-bottom to build the page structure (DOM), downloads linked CSS stylesheets to apply colors and layout, and executes JavaScript to wire up buttons and interactivity.
Anatomy of a URL
Understanding URL parts stops backend errors and broken links from ever feeling mysterious:
https:// yadavacademy.com /courses/python ?track=free #syllabus
└─┬──┘ └──────┬───────┘ └──────┬──────┘ └─────┬─────┘ └────┬────┘
Protocol Domain Path Query Params Fragment| Part | Example | What It Does |
|---|---|---|
| Protocol | https:// | Rules for sending data (https encrypts traffic; http does not) |
| Domain | yadavacademy.com | Human-friendly name mapped by DNS to a server IP |
| Path | /courses/python | Specific resource or page requested on that server |
| Query String | ?track=free | Extra key=value filters or search terms passed to the server |
| Fragment | #syllabus | Jumps the browser straight to a section ID inside that page (stays local!) |
HTTP Methods & Status Codes You Will See Every Day
Every HTTP request carries a verb (method) describing the user's intent, and every response returns a 3-digit status code summarizing the outcome:
| Category | Code / Method | Plain-English Meaning |
|---|---|---|
| Method | GET | "Please send me this page or data." (Safe to refresh; never modifies server data.) |
| Method | POST | "Here is form data—create an account, post a comment, or save an order." |
| Method | PUT / PATCH | "Update an existing record." (PUT replaces whole record; PATCH updates chosen fields.) |
| Method | DELETE | "Remove this specific record." |
| 2xx Success | 200 OK / 201 Created | Request succeeded (201 confirms a new resource was saved). |
| 3xx Redirect | 301 / 302 | Page moved—browser automatically jumps to the new URL. |
| 4xx Client Error | 400, 401, 403, 404 | Something went wrong on the caller's side: bad data (400), not logged in (401), forbidden (403), or wrong URL (404 Not Found). |
| 5xx Server Error | 500, 503 | Your browser asked politely, but the backend server crashed or overloaded. |
4xx means "Client mistake" (check your URL spelling, missing header, or login token). 5xx means "Server mistake" (the backend server threw an error or went down).
The Frontend Trio Inside Every Response
Once an HTML document arrives in your browser, all modern websites—from simple portfolios to full applications—rely on three languages working together like constructing a home:
- HTML builds the skeleton & meaning (headings, paragraphs, forms, buttons, links).
- CSS adds paint, spacing & layout (colors, typography, cards, mobile responsiveness).
- JavaScript wires up electricity & behavior (filtering search results, opening modals, fetching live updates without reloading).
Try Inspecting a Live Page Structure
In the playground below, click Run & Preview to render a minimal HTTP response body with all three pieces working side by side, then change the button message to watch JavaScript react immediately:
Quick Checkpoints
Your browser requests /dashboard without being logged in yet, and the server blocks access because authentication is missing. Which status code range applies?
What is DNS responsible for when you visit a website?