5.1 The Internet and the World Wide Web

Question Bank · 15 Questions

Objectives: Students should be able to —

  • 1 Give differences between the Internet and the World Wide Web (WWW).
  • 2 Explain what is meant by Uniform Resource Locator (URL) and its components.
  • 3 Describe the purpose and operation of hypertext transfer protocols (HTTP and HTTPS).
  • 4 Describe the purpose and function of a web browser.
  • 5 Explain how web pages are located, retrieved and displayed.
  • 6 Describe cookies, including session and persistent cookies.
  • 7 Describe HTML structure and presentation, and CSS.

Internet and World Wide Web

(a) Internet:

★ The word Internet comes from INTERconnected NETwork.

★ Internet is the world's largest interconnected network of computers and devices.

Internet Service Provider (ISP) provides Internet to the public to become part of the Internet.

★ Internet allows users to share or exchange information among users through services.

★ Allows users to chat online (via text, audio and video), send and receive emails.

(b) World Wide Web (WWW):

World Wide Web is a collection of websites, web-pages and other resources.

★ All web resources of WWW are accessed using the Internet.

★ It allows web-documents to be connected to other documents by hypertext links — moving from one document to another.

HTTP(S) protocols are written using Hypertext Mark-up Language (HTML).

★ Web-pages and other web resources are identified by Uniform Resource Locator (URL).

★ A web-browser is used to view web pages that contain text, images, video and multimedia.

(c) Difference between Internet and World Wide Web:

Internet World Wide Web
It is a worldwide collection of interconnected networks of computers and devices.It uses the Internet to access resources from web servers.
It allows the user to send and receive emails.It is a collection of web pages, multimedia and other information from websites.
Allows online chatting (via text, audio and video).HTTP(S) protocols are written in hypertext mark-up language (HTML).
Makes use of Transmission Control Protocol (TCP) and Internet Protocol (IP).Uses Uniform Resource Locators (URL) to specify the location of web pages.
INTERNET (TCP/IP — interconnected computers) World Wide Web (websites / web-pages via http/https + URL) Web Server

Other Internet services: Email (SMTP/POP/IMAP), VoIP, FTP, ATM, Telnet.

(a) ISP (Internet Service Provider):

Internet Service Provider (ISP) are companies that provide access to the Internet.

★ A monthly fee is usually charged for this service.

★ The ISP will set up a user account which will contain a username and a password.

(b) Services provided by ISP:

  1. Internet access.
  2. Domain name registration.
  3. Web hosting.
  4. Online storage service.
  5. Email.

Uniform Resource Locator (URL)

(a) URL — Uniform Resource Locator:

★ URL stands for "Uniform Resource Locator".

★ It is the user-friendly unique web address of the web-document or file that you wish to view.

★ URL consists of three parts:

  • Protocol.
  • Domain name or Website name.
  • Webpage or file name.
http://www.alifushi.com/ComputerSci.html
↑ Protocol    ↑ Domain name    ↑ Webpage name

(b) Three components of a URL:

1) Protocol:

⇒ The first part of the URL indicates which protocol the browser must use.

⇒ A protocol is a set of rules that must be obeyed when transferring data.

⇒ Usually for websites it is the HTTP protocol or its secured version HTTPS.

HTTP stands for HyperText Transfer Protocol.

⇒ HTTP defines how messages are formatted and transmitted, and what action web servers and browsers should take in response to various commands.

2) Domain name / Website name:

Domain name is the user-friendly name of a website used in place of its IP address.

⇒ Its role is to make it easier to access a given website.

3) Webpage / File name:

File name is the last part of the URL that refers to the file or web page being requested.

⇒ Web browser either downloads or reads and displays the contents of the file.

(c) Components of a Website name:

www.compscience.edu.mv
↑ Domain host    ↑ Domain name    ↑ Domain type

1) Domain host:

Domain host is the name of the sub-domain, a part of the main domain that can be accessed by your website visitors.

WWW indicates that the site is part of the web that provides services.

⇒ It allows websites to separate and organize content for a specific function.

2) Domain name:

Domain name is the name of the website, or the root-directory of the website.

⇒ It indicates where we want to go first on the web over the Internet.

3) Domain type:

Domain type is a domain extension name with 2 or 3 characters separated with a dot.

⇒ For example, .co, .edu, .com, .org, .net, .gov.

⇒ Domain type could include a 2-character country code extension, e.g. .uk, .in, .mv, .us.

Hypertext Transfer Protocols (HTTP & HTTPS)

(a) Protocol:

⇒ A protocol is an agreed-upon set of rules for exchanging data between two devices.

(b) HTTP — HyperText Transfer Protocol:

⇒ It is a request-response protocol used for transferring data between a client and a server.

⇒ It is used to load web pages using hypertext links.

⇒ It sends data in plain text format.

⇒ It does not store any information about previous requests or responses.

⇒ It sends and receives data over port 80.

(c) Difference between HTTP and HTTPS:

⇒ Both HTTP and HTTPS are request-response protocols used for transferring data between a client and a server.

HTTPS is a secure version of HTTP that ensures the safety of data when transmitted over the Internet.

HTTP sends data in plain text format making it vulnerable to interception.

HTTPS establishes an encrypted link between web-server and web-browser.

HTTP sends data over port 80 while HTTPS uses port 443.

HTTP HTTPS
HyperText Transfer ProtocolHyperText Transfer Protocol Secure
Sends data in plain textSends data in encrypted form
Uses port 80Uses port 443
Vulnerable to interceptionSecure — uses SSL / TLS encryption

(d) How to know whether a website is secure:

⇒ A secure website uses the https protocol in the URL.

⇒ It shows a small padlock icon in the status bar at the top-left of the address bar.

Web Server and DNS Server

★ A dedicated computer that stores, processes, and delivers the requested web pages to clients.

★ The communication between client and server takes place using the HyperText Transfer Protocol (HTTP).

★ DNS stands for Domain Name System.

★ A DNS server is a computer server that stores the database of domain names and their matching IP addresses.

★ It translates the domain name to its unique IP-address so that browsers can load the requested website.

Web Browser

(a) Web browser:

Web browser is a software used to access information on the World Wide Web.

★ It is used to locate, retrieve and display the contents of the web-page or web resource.

★ It interprets, translates and displays the contents of the HTML document.

★ It interprets, translates and executes the embedded scripts (like JavaScript) inside the web page.

Examples:

Microsoft Internet Explorer Google Chrome Mozilla Firefox Opera Apple Safari

(b) Three functions of a browser:

  • Sends a request to the web server to provide the webpage or web resource.
  • Receives data from the web server.
  • Translates HTML files.
  • Processes client-side script, e.g. JavaScript.
  • Store / access cookies.
  • Stores data in its cache.
  • Identifies the protocols such as http, https, ftp etc.
  • Downloading files from the web.

(c) Three features of a browser:

  • Allows to Bookmark the web page which you may need later (store favourites).
  • Stores History of the websites or webpages visited.
  • Allows navigation forward and backward.
  • Allows to reload or refresh the webpage.
  • Allows multiple tabs / web pages to be opened.
  • Provides Security features.
  • Find specific text within a web page.
  • Allows to set a homepage.

Locating, Retrieving and Displaying Web Pages

  1. The web browser sends the URL to the DNS server.
  2. The DNS server stores an index of URL and its matching IP address.
  3. DNS searches for the URL to obtain the IP address.
  4. The IP address is sent back to the web browser, if it is found.
  5. The web browser sends a request to the IP address of the web server to provide the webpage.
  6. The web server sends the web page to the web browser.
  7. The web browser interprets the HTML to display the web page.
  8. If DNS server-1 cannot find the requested website in its database or cache, it forwards the request to another DNS server (DNS server-2).
  9. If DNS server-2 finds the URL, then it sends the IP-address back to DNS server-1, which forwards it to the browser.
Web Browser → sends URL → DNS Server → returns IP → Web Browser → request → Web Server → web page → Browser (displays HTML)

⇒ The customer either clicks on a link or types in the URL / web-address of the website.

⇒ This web address is translated into an IP-address by the DNS server.

⇒ The web browser sends a request to the IP-address of the web server for the information.

⇒ The web server locates the IP address and sends the HTML code of the web page back to the browser.

⇒ The browser interprets the HTML code and shows the correctly formatted page to the user.

⇒ The browser sends data to the company's website and it is stored in the web server.

⇒ Processed data by the company's website is sent back to the browser using HTTP/HTTPS.

If the URL is not found, the DNS returns an error.

Cookies

(a) Cookie:

⇒ A cookie is a text file sent by the web-server to the web-browser.

⇒ It is stored on the user's computer by the web-browser at the request of the web-server.

⇒ They are designed to hold data related to a particular client and website.

⇒ It can be accessed either by the web server or the client computer each time the user revisits the website.

(b) Three purposes of Cookies:

  • It stores the website's Login information.
  • It allows the detection of new and repeated visitors of the website.
  • It stores the customization of the web-page (e.g. remembering where the user left off).
  • It allows to track user's browsing activities and preferences (like language).
  • It helps advertisers to show relevant advertisements.

(c) Are Cookies harmful?

No, cookies are not harmful as they are not executable program files. They are just plain text files.

⚠ Note: To locate cookies in Windows — open the Run-box (press Win-key + R) and type cookies.
It is located at: C:\Users\username\AppData\Local\Microsoft\Windows\...

(a) Session cookies:

Session cookies exist only in temporary memory and do not store any data on the hard drive.

★ It does not collect any information from the user's computer and does not record browsing history.

★ It stores only the user's input and tracks the movements of the user within a website.

For example, when making online purchases, it keeps the user's items in a virtual shopping basket.

★ Session cookies are lost when the web-browser is closed or the website session ends.

(b) Persistent (or permanent) cookies:

Persistent cookies are stored on the hard drive by the web-browser on the user's computer.

★ It remains on the user's hard drive until the user deletes them or they expire.

★ It stores the user's login details, settings and preferences that a user has set.

★ It removes the need to type in login details every time a certain website is visited.

★ Personal information is encrypted and stored to prevent unauthorised access.

★ It helps to create a convenient and faster website experience.

★ Persistent cookies are a very efficient way of carrying data from one session to another.

  1. Allow the website to remember user's passwords, email addresses and information needed every time they visit that website.
  2. Serve as a memory, enabling the website to recognise users every time they revisit it.
  3. Save user's items in a virtual shopping basket / cart.
  4. Track internet habits and user's website histories or favourites / bookmarks.
  5. Store user's preferences to recognise customised webpages.
  6. Allow progress in online games and quizzes to be stored.

(a) How cookies store and automatically enter payment details:

⇒ A cookie is a text file sent by the web-server to the user's web-browser.

⇒ It is stored on the user's computer by the web-browser at the request of the web-server.

⇒ The user's payment details are encrypted and stored in this text file.

⇒ When the user revisits the website, the webserver requests its cookie file to access the stored payment details and automatically fills in the payment form.

(b) Why a user may be concerned about personal data and online security:

⇒ The user does not know what information is collected and stored in the cookie.

⇒ The computer could be hacked to obtain confidential data stored in cookies.

⇒ Other websites could gain unauthorised access to the cookies stored on a user's computer.

⇒ The user's profile could be built and stored in a cookie, leading to identity theft.

HTML Structure, Presentation and CSS

(a) HTML — HyperText Markup Language:

HTML stands for "Hyper Text Markup Language".

★ HTML is the standard markup language for creating web pages.

"Hypertext" refers to the text that contains hyperlinks (or links) to other documents.

"Markup language" refers to the way HTML tags are used to define the elements within a document.

★ It is used in processing, defining, and presenting the contents of the web page.

(b) Difference between Structure and Presentation:

Structure:

⇒ Structure is an essential part of an HTML document which includes semantic elements.

⇒ It instructs how the layout of the content is displayed.

⇒ It stores the overall contents of a web-page like Title, Headings, Paragraphs, Images, Tables.

Presentation:

⇒ Presentation is the style of the document.

⇒ It instructs how the document will give a pleasing look using different fonts, colours and sizes.

⇒ The presentation of the web-page is usually kept in a separate CSS file.

(c) (i) Three examples of HTML structure:

  1. Giving the Title of the web-page, to be shown in the title bar of the web page.
  2. Placement of headings and sub-headings on a web-page.
  3. Placement of a paragraph of text on the web-page.
  4. Placement of an image on the web-page.
  5. Drawing a Table to put the contents in rows and columns on the web-page.

(ii) Three examples of HTML presentation:

  1. The colour applied to a text heading, on a web-page.
  2. The font style applied to a paragraph of text on a web-page.
  3. The font size given to a paragraph of text on a web-page.
  4. The size that an image is set to be displayed on the web-page.
  5. The height and width of a table is set to be displayed on the web-page.

(d) Why HTML Structure and Presentation files are stored separately:

⇒ Separating the presentation file from the structure of the HTML allows a designer to work on either file independently.

⇒ The style of the document could be reused by its name, wherever the style is needed.

⇒ The same presentation file could be shared or used by multiple web-pages for a consistent look.

Example of HTML Structure and Presentation files:

Structure (.html file) Presentation (.css file)
<html>
<head>
  <title> Computer Science </title>
  <link rel="stylesheet" type="text/css"
        href="Presentation.css" />
</head>
<body>
  <h1> My First Heading </h1>
  <p class="style-1">
     My First Paragraph
  </p>
  <img src="rose.jpg" alt="flower">
</body>
</html>
h1 {
  font-family: arial;
  color: #FF0000;
  text-align: center;
  font-size: 42px;
}

.style-1 {
  font-family: times;
  color: #0000FF;
  text-align: justify;
  font-size: 24px;
}

CSS is a style sheet language that describes and stores the styles (like fonts, colours, layout) for a web page.

CSS describes how HTML elements should be displayed with a pleasing look.

CSS file is linked to the HTML document to implement the presentation rules.

CSS is designed to separate the content of a document from its presentation.

Revision: Statements and Key Computing Terms

Statement Key Term
The world-wide interconnection of networks; the infrastructure that uses TCP and IP protocols.Internet
A massive collection of web pages that is based on the Internet and uses HTTP/HTTPS protocols.World Wide Web (WWW)
Software that connects to a domain name server (DNS) to retrieve a web page; the browser interprets HTML web pages sent to a user so the user can read documents and watch multimedia.Web browser
The language used to design, display and format web pages; written using http(s) protocols.Hypertext mark-up language (HTML)
A text-based address for a web-page.Uniform Resource Locator (URL)
HTTP with extra security (such as SSL or TLS) applied.Hypertext transfer protocol secure (HTTPS)
Highlighted text or an image that is activated by clicking; it links to other text, images, a web page or a website.Hypertext
A server that looks up domain names for websites (for example, www.hoddereducation.com) in order to find the IP address the browser needs to locate the web servers.Domain Name Server (DNS)
A text file sent from a website to a user's browser; it stores user preferences each time they visit the website.Cookie
Settings or options stored in cookies that can remember preferences for web pages or indicate browsing history to target advertisements.User preferences
A cookie that is stored temporarily on a computer while the user is browsing; it is deleted when the browser is closed or the website session ends.Session cookie
A cookie that is stored on the user's hard drive and remains there until the expiry date is reached or the cookie is deleted by the user.Persistent cookie
An area of memory in a website where items a user has selected are temporarily stored; items remain in the basket until checkout or the session has ended.Virtual shopping basket
A style sheet language that describes how HTML elements should be displayed; separates presentation from content.Cascading Style Sheet (CSS)