Open a few tabs and visit:
google.com
instagram.com
docs.google.com
babson.edu
username.github.io
What do they have in common? What's different?
The line is blurry! Many "websites" are actually "web apps"
Simple websites
Interactive web apps
You'll be able to build ALL of these by the end of this course!
Exercise: Right-click on any webpage → "View Page Source"
Every website you visit is just text files that your browser interprets!
https://www.babson.edu/academics/index.html (just an example)
https://www.babson.edu/academics/index.html
https://
www.babson.edu
/academics/index.html
babson.edu/about
babson.edu/about/
babson.edu/page.html
The domain tells you WHERE, the path tells you WHAT
When you type https://www.babson.edu and press Enter:
https://www.babson.edu
DNS = Domain Name System (the "phone book" of the internet)
166.117.19.175
Computers use IP addresses, but humans prefer readable names.
HTTP = HyperText Transfer Protocol
Your browser sends a request to the server:
GET /index.html HTTP/1.1 Host: www.babson.edu
Common HTTP methods:
The server sends back a response:
HTTP/1.1 200 OK Content-Type: text/html <!DOCTYPE html> <html>...
Status codes:
200
404
500
curl -i https://example.com
This is exactly what your browser does - it downloads text!
The browser just makes it look pretty by interpreting the HTML/CSS/JS.
The browser receives files and displays them:
You (Browser) Internet Server | | | |-- DNS: babson.edu? --->| | |<- IP: 166.117.19.175 ->| | | | | |-- GET /index.html -----|-----------------> | | | | |<---- HTML, CSS, JS ----|------------------ | | | | [Render page] | |
Open Terminal (Mac) or Command Prompt (Windows):
# Windows ipconfig # Mac ifconfig
Look for:
192.168.x.x
10.x.x.x
nslookup www.babson.edu
What you'll see:
ping www.babson.edu
Press Ctrl+C to stop
Ctrl+C
# Windows tracert www.google.com # Mac traceroute www.google.com
This shows the physical journey of your data across the internet!
ipconfig
ifconfig
nslookup
ping
tracert
traceroute
You don't need to memorize these - just know they exist for debugging!
Static website:
Dynamic website:
We'll build static websites that feel dynamic using JavaScript!
Every website uses these three together.
Keyboard shortcuts:
Or: Right-click → "Inspect"
Try it: Right-click any element → Inspect → change its color!
Try it: Open Network → refresh the page → watch the requests!
Try it: Type document.title and press Enter
document.title