Courses / Application of ICT (GEN-103) – BS 1st Semester

Week 15 Theory – The World Wide Web

Week 15 – World Wide Web · 60 min read · 32 MCQs to check yourself

Introduction to the World Wide Web (WWW)

The World Wide Web (WWW, "the Web") is a huge collection of interlinked hypertext documents and resources (web pages) stored on web servers around the world and accessed through the Internet using a web browser.

Internet vs WWW

Internet World Wide Web
Global network of computers (infrastructure) Collection of linked web pages (information service)
Started 1969 (ARPANET) Started 1989–91
Uses many protocols: TCP/IP, FTP, SMTP… Uses mainly HTTP/HTTPS
Includes email, VoIP, FTP, the Web… Is one service of the Internet

How the Web works (client–server)

 You type URL → Browser (client) → DNS finds server IP → HTTP request → Web server
                                 ← HTML, images, CSS, JS (HTTP response) ←
 Browser renders the page on screen

Terms related to WWW

Term Meaning
Web page A single document on the Web, written in HTML, that may contain text, images, video and links. Static pages show fixed content; dynamic pages change (e.g. your Facebook feed).
Website A collection of related web pages under one domain name, managed by one person/organisation (e.g. www.hec.gov.pk).
Home page The main/first page of a website (often index.html); also the page a browser opens at start-up.
Web browser Software to view web pages (Chrome, Edge, Firefox, Safari).
Web server A computer (hardware) and software (Apache, Nginx, Microsoft IIS) that stores websites and delivers web pages to browsers on request.
Search engine Website that helps find pages by keywords (Google, Bing).
Hyperlink Clickable link to another page/resource.
Web hosting Service that provides space on a web server connected to the Internet so a website is available online 24/7.
Domain name Human-friendly name of a website, e.g. google.com, uet.edu.pk.
Web portal A website that gathers information/services from many sources in one place.

Uniform Resource Locator (URL) and its parts

A URL is the complete, unique address of a resource (page, image, file) on the Web.

https://www.example.edu.pk:443/admissions/bs-it.html?year=2025#fees
└─┬─┘   └─┬┘ └────┬─────┘ └┬┘ └─────────┬────────┘ └───┬───┘ └┬┘
protocol  sub-   domain    port    path / file name    query  fragment
(scheme)  domain  name                                 string (anchor)
Part Example Meaning
Protocol (scheme) https:// Rules used to access the resource – http, https (secure), ftp, mailto
Subdomain www Part of the domain, often "www" (World Wide Web) or a section like lms.
Domain name example.edu.pk Name of the website; consists of second-level name + top-level domain (TLD)
Top-level domain .pk, .com, .edu Type or country of the website
Port (optional) :443 Communication port (80 for HTTP, 443 for HTTPS); usually hidden
Path /admissions/ Folder location on the server
File name bs-it.html The specific page/file
Query string (optional) ?year=2025 Data sent to the server (after ?, pairs joined by &)
Fragment / anchor (optional) #fees A specific section within the page

Common top-level domains (TLDs)

TLD Used by
.com Commercial organisations
.org Non-profit organisations
.net Network providers
.edu Educational institutions (US); .edu.pk in Pakistan
.gov Government; .gov.pk in Pakistan
.mil Military
.int International organisations
Country codes .pk Pakistan, .uk United Kingdom, .cn China, .sa Saudi Arabia

DNS converts the domain name into the server's IP address (e.g. www.example.com → 93.184.216.34).

Web hosting

Web hosting is the service of storing a website's files on a web server that is permanently connected to the Internet so anyone can access the site.

Types of hosting

To publish a website: (1) design pages (HTML/CSS), (2) register a domain name with a domain registrar (PKNIC for .pk), (3) buy hosting, (4) upload files (FTP or control panel), (5) point the domain to the host (DNS).

Types of websites

Type Purpose Examples
Web portals Gateway that collects information, links and services from many sources in one place; often needs login MSN, Yahoo!, Pakistan.gov.pk, university student portals
News websites Provide current news, articles and updates Dawn.com, BBC News, Geo News
Informational websites Provide factual information on topics Wikipedia, WebMD, government info pages
Educational websites Teaching and learning materials, courses, tutorials Khan Academy, Coursera, W3Schools, HEC, university sites
Personal websites Created by individuals to share their profile, blog, portfolio, CV Personal blogs, portfolio sites
Business websites Promote/sell products and services; e-commerce Daraz.pk, Amazon, company sites
Entertainment websites Games, music, videos, movies, humour YouTube, Netflix, Spotify

Others: social networking (Facebook, LinkedIn), blogs, forums, wikis, e-government sites, search engines, content aggregators.

The World Wide Web – Crash Course Computer Science #30

The Internet: HTTP & HTML (Code.org)

Short and long questions

1. Differentiate between the Internet and the WWW.

Model answer

The Internet is the global network infrastructure connecting computers (since 1969) and supports many services using TCP/IP. The WWW is one service on the Internet — a collection of linked web pages accessed with browsers via HTTP (since 1989–91).

2. What is the World Wide Web? Who invented it?

Model answer

The WWW is a system of interlinked hypertext documents (web pages) stored on web servers and accessed over the Internet using web browsers and HTTP. It was invented by Tim Berners-Lee at CERN in 1989.

3. Explain how the World Wide Web works using the client–server model, and describe web hosting.

Model answer

Working: (1) the user types a URL or clicks a link in a browser (client); (2) the browser asks DNS to convert the domain name to an IP address; (3) the browser sends an HTTP/HTTPS request to the web server at that IP; (4) the web server finds the requested page and sends back HTML, CSS, JavaScript and images in an HTTP response; (5) the browser renders the page; links on the page repeat the process. Web hosting: to make a site available, its files are placed on a web server permanently connected to the Internet. Steps: design pages, register a domain name (e.g. through PKNIC for .pk), buy hosting, upload files (FTP/control panel) and point the domain's DNS to the host. Types: shared (cheap, many sites per server), VPS (virtual private portion), dedicated (whole server), cloud (scalable network of servers) and free hosting (limited).

4. What is a web server?

Model answer

A web server is a computer with server software (e.g. Apache, Nginx, IIS) that stores website files and delivers web pages to browsers when they request them through HTTP/HTTPS.

5. Differentiate between a web page, a website and a home page.

Model answer

A web page is a single HTML document on the Web. A website is a collection of related web pages under one domain name. A home page is the main/first page of a website (or the start page of a browser).

6. What is a URL? Explain its different parts with an example.

Model answer

A URL (Uniform Resource Locator) is the complete unique address used to locate a resource on the Web. Example: https://www.example.edu.pk:443/admissions/bs-it.html?year=2025#fees

  • Protocol (scheme): https – rules for accessing the resource (http, https, ftp, mailto).
  • Subdomain: www – part of the domain identifying a service.
  • Domain name: example.edu.pk – name of the website, ending in a top-level domain (.pk, .com, .edu, .org, .gov).
  • Port: 443 – optional communication port (80 HTTP, 443 HTTPS).
  • Path: /admissions/ – folder location of the file on the server.
  • File name: bs-it.html – the specific page.
  • Query string: ?year=2025 – parameters sent to the server.
  • Fragment: #fees – a section within the page. DNS translates the domain name into the server's IP address so the browser can connect.

7. Write any four top-level domains with their use.

Model answer

.com – commercial; .org – non-profit organisations; .edu – education; .gov – government; .net – network providers; .pk – Pakistan (country code).

8. Define URL and name its parts.

Model answer

A URL (Uniform Resource Locator) is the unique address of a resource on the Web. Parts: protocol (https://), subdomain (www), domain name with TLD (example.edu.pk), optional port (:443), path (/admissions/), file name (page.html), query string (?id=5) and fragment (#section).

9. What is web hosting? Name its types.

Model answer

Web hosting is a service that stores a website's files on a server permanently connected to the Internet so the site is accessible 24/7. Types: shared hosting, VPS hosting, dedicated hosting, cloud hosting and free hosting.

10. Define WWW and explain the terms web page, website, web browser, web server, URL, search engine, home page and web hosting. Also explain types of websites.

Model answer

WWW: collection of interlinked web pages on servers accessed via Internet using browsers and HTTP (Tim Berners-Lee, 1989). Web page: single HTML document. Website: collection of related pages under one domain. Web browser: software to view pages (Chrome). Web server: computer/software that stores and delivers pages (Apache). URL: unique address of a resource (protocol, domain, path, file). Search engine: finds pages by keywords (Google). Home page: main/first page of a site. Web hosting: renting space on an Internet-connected server to publish a site. Types of websites: web portals (Yahoo, student portals), news (Dawn, BBC), informational (Wikipedia), educational (Khan Academy, W3Schools), personal (blogs, portfolios), business/e-commerce (Daraz, Amazon), entertainment (YouTube, Netflix); also social networking, blogs, forums and e-government sites.

11. Name any five types of websites with one example of each.

Model answer

Web portal – Yahoo/Pakistan.gov.pk; news – Dawn.com; informational – Wikipedia; educational – Khan Academy; personal – a blog/portfolio; business – Daraz.pk; entertainment – YouTube.

This lesson ends with a quiz of 32 MCQs. Open the lesson on PrepOasis to take it and save your progress.

Previous: Week 14 Lab 14 – HTML: Creating Your First Web Page · Next: Week 15 Lab 15 – HTML: Text Formatting Practice

All lessons in Application of ICT (GEN-103) – BS 1st Semester