Home / Computer Science / Class XII / Internet and Web
Internet and Web — CUET Computer Science hero
Class XII 💻 Computer Science Ch 18 of 20

Internet and Web

CUET unit: Internet and Web

📌 Snapshot

  • How a web page travels to your screen: network types, devices, topologies, DNS, cookies and exam traps.
  • The three network types, the six devices and the five topologies, each compared in one table.
  • URL, HTTP, HTML, static and dynamic pages, web servers and hosting explained as one request and response story.
  • Browser settings, cookies, add-ons and plug-ins, with the exact lines NTA uses in statement-based questions.

📖 Detailed Notes

Written and reviewed by Rohit Singh, Computer Science & Commerce faculty at UniDrill (MCA, Osmania University · 6 years teaching). Based on NCERT Informatics Practices Class XII, Chapter 5.

What happens in the second after you press Enter?

You type a web address, press Enter, and a page appears almost instantly. In that one second your request has crossed your Wi-Fi router, your Internet provider and a chain of networks, been matched to a numeric address, reached a computer in a data centre, been answered, and travelled all the way back. Every term in this chapter is one link in that chain, so learn it as a story and not as a glossary.

The journey in one line: Browser → DNS (name to IP address) → router and ISP → web server → HTTP response → page shown in the browser.

Network basics: why connect computers at all?

A computer network is an interconnection of two or more computers or computing devices so that they can share data and resources. The classic example is a school lab where one printer serves thirty PCs, and one server holds the files everybody needs. Each device on the network that can receive, create, store or send data is a node. A node can be a computer, a printer, a server, or a networking device such as a hub, bridge, switch, router, modem or digital telephone handset.

Data does not travel as one big lump. It is divided into small chunks called packets, and the network carries the packets separately. That is how a switch or router can interleave traffic from many users on the same cable. Devices can be joined by wired media (cables) or wireless media (air). A phone hotspot connected to your laptop is the smallest everyday example of a network.

Types of networks: how far does it reach?

Networks are grouped by the area they cover and the data transfer rate. Think of a classroom, a city and a country, then match one network type to each.

Feature LAN (Local Area Network) MAN (Metropolitan Area Network) WAN (Wide Area Network)
Area covered A room, floor, building, school or campus, up to about 1 km A city or town, up to about 30 to 40 km Different cities, countries or continents
Speed High, from 10 Mbps (Ethernet) to 1000 Mbps (Gigabit Ethernet) Mbps, but lower than a LAN Varies with the links used
Built by Wires, Ethernet cables, fibre optics or Wi-Fi Joining many LANs Joining LANs and MANs by wired or wireless media
Security Comparatively secure, since only authentic users can reach shared resources Moderate Hardest to secure, since it crosses public links
Example A school computer lab Cable TV network, cable broadband The Internet, the largest WAN

Ethernet is not a cable. It is the set of rules that decides how devices connect through cables in a LAN, which is why the speed names (Ethernet, Gigabit Ethernet) are attached to LANs.

Why it works this way. A short, private cable run can be fast and cheap, so LANs are quick and secure. The longer the distance, the more it costs to keep every link fast, so MANs are slower than LANs and WANs usually rent or share links. That trade of distance against speed is the reason the three types exist.

Beyond the textbook. For the exam: LAN speeds are quoted in Mbps, which means megabits per second. In reality: file sizes on your phone are in megabytes, and one byte is 8 bits. So a 100 Mbps link moves at best about 12.5 megabytes per second. A 250 MB video therefore needs at least 250 × 8 ÷ 100 = 20 seconds on a perfect 100 Mbps link, and longer in practice. Mixing up Mbps and MBps is the commonest slip in speed questions.

Network devices: who does what?

Different devices solve different problems. Read the table as a list of jobs, because exam questions describe the job and ask for the device.

Device Its one job Remember it by
Modem Converts digital data to analog signals (modulation) at the sender and analog back to digital (demodulation) at the receiver MOdulator DEModulator; one modem at each end
Ethernet card (NIC) Network adaptor on the motherboard that connects a computer to a wired network, 10 Mbps to 1 Gbps Has a unique MAC address
Repeater Regenerates a weakened signal on a cable; signals fade after about 100 m An analog device
Hub Sends data arriving on any port out of all the other ports Collides if two devices send together
Switch Reads the destination address of each packet, looks it up in a table and sends it only to the target Drops noisy or corrupted packets and asks for a resend
Router Receives, analyses and forwards data to other networks; can repackage packets into smaller ones for a different network type Connects a LAN to the Internet
Gateway Entry and exit point between an organisation's network and the Internet Firewall is usually integrated with it

Hub or switch? Picture a classroom. A hub is a teacher who announces every message loudly so the whole room hears it, and only the right student acts on it. A switch is a teacher who walks over and whispers it to that one student. The hub wastes bandwidth and two simultaneous announcements collide. The switch can handle several private conversations at the same time.

Pause and predict: ten PCs are connected to a hub. PC 1 sends a file to PC 2. How many other ports receive the signal? What changes if the hub is replaced by a switch?

Check your answer: a hub sends the signal out of all the other nine ports, and only PC 2 uses it. With a switch, only the port of PC 2 gets the packet, and PC 3 and PC 4 can exchange data at the same moment without a collision.

Router and gateway are not the same. A router decides the path between networks and can change how data is packaged. A gateway is the point through which everything entering or leaving the network must pass. In practice a router is often configured to act as the gateway. For a home connection, the gateway is usually the ISP. Today's home Wi-Fi box is a router and a modem or switch in one casing, which is why the textbook says it does a "dual task".

Topologies: how are the nodes arranged?

The arrangement of computers and peripherals in a network is its topology. The five to know are mesh, ring, bus, star and tree (hybrid). For each, ask two questions: how does data move, and what happens when something fails?

Topology How it is wired Strength Weakness
Mesh Every device connected to every other Handles heavy traffic, very reliable, more secure because each cable carries different data Complex wiring, high cost, many unused connections
Ring Each node joined to two neighbours in a circle Simple structure Data moves one way only (clockwise or anticlockwise); less secure and less reliable
Bus All nodes share one backbone wire Cheaper and easy to maintain Less secure and less reliable; data goes both ways along the whole bus
Star Every node linked to a central hub or switch Fast, efficient; one faulty device does not affect the rest If the central device fails, the whole network fails
Tree or hybrid Branches of star, ring or bus joined hierarchically Suits WANs where many LANs are linked Data must first reach the central device and then spread through the branches

Mesh wiring grows fast. A fully connected mesh of $n$ nodes needs

$$\text{wires} = \dfrac{n(n-1)}{2}$$

because each of the $n$ nodes links to the other $n-1$, and every wire is counted twice, once from each end.

Nodes Calculation Wires
5 $5 \times 4 \div 2$ 10
8 $8 \times 7 \div 2$ 28
10 $10 \times 9 \div 2$ 45
20 $20 \times 19 \div 2$ 190

Doubling the nodes from 10 to 20 more than quadruples the wires (45 to 190). That is why mesh is used only where reliability is worth the cost.

Pause and predict: a cyber café joins 20 PCs to one switch in a star. One PC is switched off and the switch then loses power. What is affected in each case?

Check your answer: switching off one PC affects nobody else, because every PC has its own cable to the switch. When the switch loses power, every PC loses the network. The central device is the single point of failure of a star.

The same wire count can be checked with a short program.

Code
def mesh_wires(n):
    return n * (n - 1) // 2
for n in [5, 8, 10, 20]:
    print(n, mesh_wires(n))
Output
5 10
8 28
10 45
20 190

The Internet: a network of networks

The Internet is the global network of computing devices: desktops, laptops, servers, tablets and phones, plus networking devices such as routers, switches and gateways. Smart appliances, drones, vehicles, door locks and security cameras now join it too.

Your device connects through a modem, by cable or Wi-Fi, to a local Internet Service Provider (ISP), which is any organisation that provides access to the Internet. Many ISPs link into a regional network, regional networks link into a national network, and the national networks together form the Internet backbone. The Internet is the largest WAN.

Internet and web are not the same thing. The Internet is the huge network of connected computers, and some of them may have no web page to share. The World Wide Web (WWW) is the collection of interlinked web pages stored on those computers and reached over the Internet. Email, chat and VoIP use the Internet without using the web. So the web is one application that runs on the Internet.

Applications of the Internet

The four broad services are the WWW, email, chat and VoIP.

The World Wide Web. Sir Tim Berners-Lee, a British computer scientist, invented the web in 1990 by defining three technologies:

Technology Full form What it does
HTML HyperText Markup Language Uses tags to design standardised web pages so any computer can read them
URI Uniform Resource Identifier Uniquely identifies a resource on the web, by its location, its name or both
HTTP HyperText Transfer Protocol The rules for retrieving linked web pages; HTTPS is the more secure version

A URL (Uniform Resource Locator) is a URI that gives the location and the protocol used to reach a resource. Take the address http://www.ncert.nic.in/textbook/textbook.htm.

Part Value here Role
Protocol http The rules used to fetch the page (could be https or ftp)
Subdomain www A section of the domain
Domain name ncert.nic.in The registered name of the website
Path /textbook/textbook.htm Where the page sits on that server

Browsers add the protocol and subdomain for you, so typing only the domain name usually works. When you do not know the address, you use a search engine such as Google or DuckDuckGo to find it.

Email. Electronic mail sends text or attached files (image, audio, video) to any number of recipients, any time. You need an account with an email service provider. Companies often use their own domain, as in [email protected]. Facilities to know:

Facility What it means
Compose, attach, draft Create a message, add files, save to send later
Cc (carbon copy) Sends a copy that every recipient can see listed
Bcc (blind carbon copy) Sends a copy without showing that recipient to the others
Forward Passes a received email on to others
Filter Moves spam or chosen mail into other folders automatically
Folders, search, signature Organise mail, find it by address or subject, add an automatic sign-off

Chat and VoIP. Chat, or instant messaging, is communication in real time, so both people must be online at the same time and use the same chat application. Email is asynchronous (the reader can reply later) and chat is synchronous (live). Modern messengers also carry images, documents, audio and video. VoIP (Voice over Internet Protocol), also called Internet telephony or broadband telephony, makes voice calls over the Internet by converting analogue voice to digital data. It is cheap or free and portable, because calls can be received on any IP phone with Internet access. Its only disadvantage is that call quality depends on the Internet speed.

Website, web page, web server and hosting

A website is a collection of web pages joined by hyperlinks, saved on a web server, sharing one domain name and a common theme. A web page is a single document on the WWW that you view in a browser. The first page of a site is the home page. A page is built with HTML and CSS, and scripts (JavaScript is the most popular, but Python and PHP are also used) make it interactive.

Static or dynamic? This is a favourite exam comparison.

Feature Static web page Dynamic web page
Content Same for every visitor until someone edits the code Can differ from user to user
What the server does Finds the file and sends it, with no extra processing Runs a program first, often reading a database, then sends the HTML it produced
Built with HTML, CSS and JavaScript, file ending .htm or .html Server side code such as PHP, ASP.NET, Python, Java or Ruby
Speed Faster to load More complex, so slower to load
Real-style example A school's "About us" page A railway ticket status page, a weather page, an online shop

Here is the smallest possible static page.

Code
<!DOCTYPE html>
<html>
<head><title>My First Page</title></head>
<body>
    <h1>Hello, World!</h1>
    <p>This is a static HTML page.</p>
</body>
</html>

The tags tell the browser how to display the text, but the page itself never changes. To make it dynamic, the server would have to build the <p> line afresh for each request, for example with the visitor's name read from a database.

The web server. A web server stores and delivers a website's content to clients such as browsers. As hardware it is the computer that stores the HTML pages, images, CSS and JavaScript files and stays connected to the Internet. As software it is the program that understands URLs coming from browsers and answers them. The browser sends an HTTP request, and the server accepts, interprets and searches, then sends an HTTP response. If it cannot find the page, it sends Error 404, page not found.

Pause and predict: a student reports "Error 404" after typing the school website address. Is the Internet down, or the server unreachable?

Check your answer: neither. A 404 message itself arrives from a working web server. It means the server received the request but could not locate that particular page, usually because of a wrong or outdated path in the URL.

Hosting and DNS. Web hosting is the service that puts a website onto the Internet. You can connect your own server to the Internet or rent server resources (CPU, RAM, storage) from a cloud provider. A hosted server gets a unique numeric IP address, which people cannot be expected to remember, so it is mapped to a textual domain name that must be registered with an authorised agency. The Domain Name System (DNS) does that mapping: when you type a domain name, DNS finds the IP address of the matching server and the request goes there.

Step to host a website What happens
1 Choose a hosting provider that offers space, database, bandwidth, backup, firewall and email
2 Pick a domain name and register it through a registrar
3 Get web space, create logins and note the server's IP address
4 Upload the files in well-organised folders
5 Map the domain name to the server's IP address

Why it matters. DNS is the phone book of the Internet: names are for humans, numbers are for machines. If DNS is wrong, the server may be perfectly healthy and still unreachable by name.

Browser, settings, add-ons, plug-ins and cookies

A browser is software for viewing web pages. It displays HTML documents with text, images, audio, video and hyperlinks. Chrome, Firefox, Internet Explorer, Opera and Safari are common browsers. Early browsers such as Mosaic, developed by the National Centre for Supercomputing Applications (NCSA), handled only plain-text static pages. Modern browsers handle dynamic sites, visual effects and encryption, and they store cookies.

Beyond the textbook. For the exam: Mosaic, from NCSA, is the answer to "the first web browser". In reality: the very first browser was WorldWideWeb, written by Tim Berners-Lee himself around 1990. Mosaic arrived in 1993 and was the first browser to become popular with ordinary users because it showed images inline. If an option lists both, read the stem carefully.

Browser settings control privacy, search engine, downloads, autofill and themes. In Mozilla Firefox, the menu button opens Options, which has five panels:

Panel What you set there
General Default browser, language and appearance, downloads, updates, network settings
Home Home page, window and tab behaviour
Search The search engine used
Privacy and Security Tracking protection, forms and passwords, history, cookies and site data, pop-up permission, add-on installation
Sync The Firefox account needed for Mozilla's services

Add-ons and plug-ins both extend a browser but differ in size and reach.

Feature Plug-in Add-on (extension)
What it is A complete program, often third party Not a complete program; adds one particular functionality
Installed where On the host computer Inside the browser
Used by The browser and other applications too The browser only
Example Flash, Java Adding sound or graphics card functionality

Beyond the textbook. For the exam: a plug-in such as Flash is needed to play some browser videos. In reality: Adobe retired Flash at the end of 2020, and today's browsers play video and run most interactive content with built-in features. If a website asks you to install an old plug-in to view something, treat it with suspicion, because fake plug-in prompts are a common way to spread malware.

Cookies. A cookie is a text file holding a string of information that a website sends to your browser. The browser stores and manages it and sends it back to the server on your next visit so that the site can recognise you. This is how a site remembers your language, keeps you logged in, remembers shopping preferences and shows ads of interest to you. The first cookie software was created in 1994 at Netscape to tell a first-time visitor from a returning one. Cookies are usually harmless: they cannot read your hard disk or carry viruses, although a virus can disguise itself as one. You can switch cookies off in the Privacy and Security settings.

Exam traps

The trap Why it's tempting The truth
"A hub sends data only to the destination." Both hub and switch connect many devices A hub sends to all other ports; a switch reads the address and sends to the target only
"MAN covers countries." M for "many" LANs MAN covers a city or town, up to 30 to 40 km; WAN covers countries or continents
"DNS is one of Berners-Lee's three technologies." DNS feels basic to the web The three are HTML, URI and HTTP
"JavaScript makes a page dynamic." Scripts make pages interactive JavaScript can run in static pages too; a dynamic page needs server side processing
"A plug-in and an add-on are the same." Both extend the browser A plug-in is a complete program usable by other applications; an add-on adds one function to the browser
"The Internet and the web are the same." Everyday speech mixes them The Internet is the network; the web is one application running on it
"A repeater works on digital data like a switch." All are network devices A repeater is an analog device that regenerates weak signals on a cable
"Cookies carry viruses and read the hard disk." They sound intrusive Cookies are text files and cannot access the disk or transmit viruses

60-second revision

Topic Lock this in
LAN, MAN, WAN Up to 1 km (10 to 1000 Mbps) · city, 30 to 40 km · countries; Internet = largest WAN
Devices Modem (modulate and demodulate) · NIC (MAC address) · repeater (regenerate) · hub (broadcast) · switch (target only) · router (between networks) · gateway (network exit with firewall)
Topologies Mesh $\dfrac{n(n-1)}{2}$ wires · ring one way · bus shared backbone · star central failure · tree hierarchical
Berners-Lee 1990 HTML · URI · HTTP (HTTPS is the secure version)
URL Protocol + subdomain + domain name + path
Static vs dynamic Same for all, .htm or .html vs server processing, can vary per user
Web server Answers HTTP requests; page not found = Error 404
Hosting IP address mapped to domain name by DNS
Browser extras Plug-in = complete program, add-on = one function, cookie = text file

Where this chapter connects

  • Same ideas, deeper: Computer Networks covers the network devices, topologies and the Internet's history in more depth, and Data Communication covers how data moves across them.
  • Safety online: Security Aspects and Societal Impacts build on cookies, HTTPS, phishing and digital footprints.
  • Earlier foundation: Emerging Trends in Class XI introduces cloud and the Internet of Things that run on the networks in this chapter.

🎯 Practice MCQs

First 3 questions free · create a free account to unlock the rest — answers & explanations included, no payment needed

Q1. In a school computer lab, a device reads the destination address of every packet, looks it up in a table and forwards the packet only to the intended computer. It also drops corrupted packets and asks the sender to resend. The device is a

▸ Show answer & explanation

Answer: C

A switch extracts the destination address and sends the signal only to the selected device. A hub sends data to every other port, a repeater only regenerates weak signals, and a modem converts between digital and analog signals.

Q2. Consider these statements. (1) A LAN can extend up to about 1 km. (2) A MAN can extend up to 30 to 40 km and covers a city or town. (3) A WAN is limited to a single building. (4) The Internet is the largest WAN. Which statements are correct?

▸ Show answer & explanation

Answer: B

Statement 3 is wrong because a WAN connects LANs and MANs across countries or continents; a single building is a LAN. Options A, C and D all include statement 3.

Q3. Sir Tim Berners-Lee defined three fundamental technologies of the World Wide Web in 1990. Which of the following is NOT one of them?

▸ Show answer & explanation

Answer: D

The three technologies are HTML for page design, URI for identifying resources and HTTP for retrieving pages. DNS maps domain names to IP addresses and is a separate service.

🔒 12 more practice MCQs

Create a free account to unlock every MCQ in this chapter — answers and explanations included. No payment needed.

Already registered? Just log in and they'll all appear here.

📊 Previous-Year Questions

Practise with real CUET Computer Science previous-year papers — every question solved, with the correct answer and a step-by-step explanation.

View solved CUET PYQ papers →

Ready to drill Computer Science?

Unlock all MCQs, chapter tests, mocks & PYQs for ₹199/year.

Get UniDrill Pro