Please enable JavaScript to use CodeHS

Networking and IT

The internet and the web

People often say internet and web like they are the same thing. They are not. The internet is the network. The web is a service that runs on top of it. This tutorial explains both and the protocols that connect them.

Protocols ~10 min Middle / High School
The Big Idea

Internet vs web

The internet is the physical and logical network that connects computers around the world. It includes cables, routers, satellites, Wi-Fi, and the protocols that move data between devices.

The World Wide Web is one service that uses the internet. It is made of pages linked by URLs, accessed through browsers. Other services on the internet include email, online gaming, video calls, and file sharing.

A good analogy is roads and traffic. The internet is the road system. The web is one type of vehicle that travels on it.


How It Works

TCP/IP

TCP/IP is the main protocol suite of the internet. It has two important parts:

  • IP (Internet Protocol): handles addressing and routing. It makes sure packets go to the right device.
  • TCP (Transmission Control Protocol): handles reliable delivery. It breaks data into packets, numbers them, and reassembles them in order. If a packet is lost, it asks for it again.

Together, TCP/IP is like a postal system with GPS tracking. IP finds the address, and TCP makes sure the letter arrives completely and in order.


Vocabulary

HTTP and URLs

HTTP, or HyperText Transfer Protocol, is the language web browsers and web servers use to talk. When you type a URL, your browser sends an HTTP request, and the server sends back an HTTP response with the page.

A URL is the address of a web page. It usually has a protocol, a domain, and a path. For example, https://codehs.com/tut/networking uses https, the domain codehs.com, and the path /tut/networking.


Interactive

Protocol stack explorer

Click Send request to see how a browser uses TCP/IP and HTTP to load a web page.

Application: Browser asks for https://example.com
HTTP: GET / request formed
TCP: Data split and numbered
IP: Packets routed across the internet
Physical: Signals travel over cables or Wi-Fi
Press the button to start.

Code

Fetching a web page

Your browser is just one program asking another program for a file. This Python program does the same thing with urllib.


Your Turn

Check yourself

Explain the difference between the internet and the web in your own words.

Your answer:

Sample answer: The internet is the global network that connects devices. The web is a service made of linked pages that uses the internet to deliver content to browsers.


Check Yourself

Quick quiz

1. What is the main difference between the internet and the web?

2. What does TCP do?

3. What does a URL tell the browser?

Keep learning

You know how the web works. Next, learn about the hardware that connects networks.

Part of the Networking and IT series.