Hello, Web! — How the Internet Works
⏱ 10 min read read
Before writing a single line of code, it helps to understand what actually happens when you visit a website.
How the Web Works:
When you type a URL like google.com into your browser, here is what happens:
1. Your browser asks a DNS server to translate "google.com" into an IP address (e.g. 142.250.80.46).
2. Your browser sends an HTTP request to that IP address.
3. Google's server receives the request and sends back an HTML file.
4. Your browser reads the HTML, finds links to CSS and JavaScript files, and downloads those too.
5. The browser renders everything into the page you see on screen.
The Three Languages of the Web:
HTML — Structure. Defines what content exists: headings, paragraphs, images, buttons.
CSS — Style. Controls how everything looks: colors, fonts, spacing, layout.
JavaScript — Behavior. Makes things interactive: respond to clicks, load data, animate elements.
Think of it this way:
HTML is the skeleton. CSS is the skin and clothes. JavaScript is the muscles that make it move.
Your First Web Page:
Every HTML page follows the same basic structure:
<!DOCTYPE html> — tells the browser this is an HTML5 document.
<html> — the root element that wraps everything.
<head> — invisible metadata: title, CSS links, character encoding.
<body> — everything the user actually sees.
How to Run It:
1. Open any text editor (VS Code is recommended — download from code.visualstudio.com).
2. Create a new file called index.html.
3. Paste the code below and save.
4. Double-click the file to open it in your browser. That's it!
No server, no setup, no installation needed for HTML and CSS.
How the Web Works:
When you type a URL like google.com into your browser, here is what happens:
1. Your browser asks a DNS server to translate "google.com" into an IP address (e.g. 142.250.80.46).
2. Your browser sends an HTTP request to that IP address.
3. Google's server receives the request and sends back an HTML file.
4. Your browser reads the HTML, finds links to CSS and JavaScript files, and downloads those too.
5. The browser renders everything into the page you see on screen.
The Three Languages of the Web:
HTML — Structure. Defines what content exists: headings, paragraphs, images, buttons.
CSS — Style. Controls how everything looks: colors, fonts, spacing, layout.
JavaScript — Behavior. Makes things interactive: respond to clicks, load data, animate elements.
Think of it this way:
HTML is the skeleton. CSS is the skin and clothes. JavaScript is the muscles that make it move.
Your First Web Page:
Every HTML page follows the same basic structure:
<!DOCTYPE html> — tells the browser this is an HTML5 document.
<html> — the root element that wraps everything.
<head> — invisible metadata: title, CSS links, character encoding.
<body> — everything the user actually sees.
How to Run It:
1. Open any text editor (VS Code is recommended — download from code.visualstudio.com).
2. Create a new file called index.html.
3. Paste the code below and save.
4. Double-click the file to open it in your browser. That's it!
No server, no setup, no installation needed for HTML and CSS.
Log in to track your progress and earn badges as you complete lessons.
Log In to Track Progress