Clients and servers, URLs, HTTP and HTTPS, browsers, HTML as structure, CSS as presentation, JavaScript as behavior, web applications, search engines, accessibility, and hosting
Every day, billions of people open a browser, type an address, and within seconds see a page assembled from files stored on a computer thousands of miles away. Understanding what actually happens in those seconds — the addresses, the requests, the responses, the languages, the protocols — is one of the most practical skills a computer scientist can have. The web is not magic. It is a carefully designed system built from a small number of powerful ideas.
Chapter 20 explains the World Wide Web as a major service that runs on top of the internet. Students will learn how browsers and servers communicate, how web addresses work, how documents travel across the network, and how HTML, CSS, and JavaScript each play a distinct role in what appears on screen. The chapter draws a clear line between the internet — the global network of computers — and the web, one service that uses that network.
By the end of this chapter, students will understand what happens when they type a URL, click a link, or submit a form. This chapter builds directly on Chapter 19 (Networks and the Internet) and prepares students for Chapter 21 (Cybersecurity Foundations) and later courses in web development, networking, and security.
Chapter 19 introduced the internet as a network of networks: packets, routers, IP addresses, DNS, and protocols. This chapter narrows its focus to the web layer that sits on top of that infrastructure. Everything from Chapter 19 — how packets travel, how DNS resolves names, how protocols define communication — applies directly here. The web is a service that uses all of those mechanisms.
Most people use the words internet and web interchangeably. In everyday conversation, the difference rarely matters. In computer science, it matters a great deal.
The internet is a global infrastructure: a worldwide network of computers connected by physical cables, fiber optics, wireless links, and satellite connections. The internet is the hardware and software layer that allows computers anywhere on Earth to send packets of data to each other. It does not belong to any one company or government. It is a shared system built on open standards and protocols.
The World Wide Web — almost always called simply the web — is a service that runs on top of the internet. The web is a collection of documents, images, videos, and interactive applications that are linked together and accessed through a browser. The web uses the internet to deliver its content, but it is not the only service that uses the internet.
Internet = the global network infrastructure (the "roads")
Web = a service that uses that infrastructure (one kind of "traffic")
Other services also use the internet but are not the web. Email follows a different set of protocols (SMTP, IMAP, POP3). Video calls transmit live audio and video streams without loading web pages. Online gaming sends game state between players and servers in real time. File transfer applications use protocols such as FTP or SFTP. Streaming audio and video use their own delivery systems. All of these services share the internet's underlying infrastructure. None of them are the internet, and none of them are the web — though some services are also available through a web interface.
The web was invented by Tim Berners-Lee in 1989 while he was working at CERN, the physics research organization in Switzerland. His original goal was modest: help scientists share documents and link related information across a network. He proposed three foundational ideas that remain at the heart of the web today.
| Founding Idea | What It Is | What It Does |
|---|---|---|
| HTML | HyperText Markup Language | A language for marking up documents with structure and meaning |
| URL | Uniform Resource Locator | A system for giving every document a unique, human-readable address |
| HTTP | HyperText Transfer Protocol | A protocol for requesting and delivering documents across a network |
From those three ideas, the web grew into the largest information system ever created. The first website went online in 1991. Today, billions of websites exist, and the web underlies e-commerce, news, social media, banking, education, government services, entertainment, and much of modern scientific research. Understanding the web means understanding these three original ideas — plus the later additions that have made it interactive, secure, accessible, and programmable.
The web is built on a relationship between two types of machines: clients and servers.
A server is a computer — or a program running on a computer — that stores resources and waits for requests. When a request arrives, the server delivers a response. Web servers store HTML files, images, videos, stylesheets, scripts, and data. They run continuously, listening for incoming connections. A client is a computer — or a program running on a computer — that makes requests to servers. On the web, a browser is the client. When you type a URL into a browser, the browser sends a request to a server and waits for the response. This pattern is called the client-server model.
Client (browser) Server (web server)
| |
| ---- sends a request ------------> |
| |
| <--- sends a response ----------- |
| |
| (browser displays the response) |
The client and server do not need to be in the same building, city, or country. When you load a page from a website hosted in a data center on the other side of the world, your browser is the client and a computer in that data center is the server. The request travels across the internet as packets, reaching the server in milliseconds.
One server, many clients. A popular web server may handle millions of requests per day from clients all over the world. Each client makes a separate request; the server processes them and sends back responses. The clients do not communicate with each other — they only communicate with the server. One client, many servers. A single web page often requires resources from multiple servers. The HTML might come from one server, the images from another, the fonts from a third, and analytics scripts from a fourth. The browser makes separate requests for each resource, then assembles the final page on screen.
A web server is just a computer running server software (such as Apache, Nginx, or Microsoft IIS) that listens on a network port and responds to HTTP requests. A powerful laptop running server software can act as a web server. Large companies use thousands of servers working together in data centers to handle traffic at scale.
Every resource on the web has an address. That address is called a URL, which stands for Uniform Resource Locator. A URL is a standardized way of identifying exactly where a resource can be found on the web. Consider this example:
https://www.example.edu/courses/intro-cs/chapter20.html?section=3#exercises | | | | | scheme host (domain) path query fragment
| Component | Example | What It Identifies |
|---|---|---|
| Scheme | https | Which protocol to use. https = secure HTTP; http = standard HTTP; mailto: = email; ftp: = file transfer. |
| Host (domain) | www.example.edu | Which server to contact. The browser uses DNS to translate this into an IP address. |
| Path | /courses/intro-cs/chapter20.html | Which specific resource on the server is being requested. Resembles a file system path. |
| Query string | ?section=3 | Additional parameters passed to the server or page. Multiple parameters separated by &. |
| Fragment | #exercises | A location within the page. The browser uses this after the page loads — it is never sent to the server. |
Well-designed URLs are readable, predictable, and stable. Compare these two URLs for the same page:
// Readable — communicates meaning https://example.edu/courses/intro-cs/chapter20 // Opaque — reveals nothing to a reader https://example.edu/page?id=84729&ref=3&v=2
The first URL tells a reader something meaningful: it is a page about introductory computer science, chapter 20. The second reveals nothing. Good URL design makes websites easier to use, easier to share, and easier for search engines to index. Modern web applications often construct URLs dynamically — there may be no actual file named chapter20.html on the server. The server generates the page content on the fly. But the URL structure still resembles a file path for readability.
Read this URL carefully and answer each question.
https://library.mgu.edu/search?query=algorithms&type=book&page=2#results
When a browser has determined a server's IP address (via DNS) and established a connection, it sends a request using a protocol called HTTP — HyperText Transfer Protocol. HTTP defines exactly how browsers ask for resources and how servers respond.
An HTTP request has several parts. The method describes what the client wants to do. The two most common are GET (retrieve a resource — used when you type a URL or click a link) and POST (send data to the server — used when you submit a form). The request also carries headers: key-value pairs providing additional information such as the host being contacted, what content types the client accepts, and any cookies to send back.
GET /chapter20.html HTTP/1.1
Host: example.edu
User-Agent: Mozilla/5.0
Accept: text/html
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 8432
<!DOCTYPE html>
<html>
... (the HTML document follows)
chapter20.html using the GET method. The server responds with status 200 (success), declares the content type as HTML, and sends the document in the response body.Every HTTP response begins with a three-digit status code indicating the result. Status codes are grouped by their first digit.
| Range | Category | Common Examples |
|---|---|---|
| 2xx | Success | 200 OK — request succeeded and resource is in the response body.201 Created — a new resource was created (used with POST). |
| 3xx | Redirection | 301 Moved Permanently — the URL has changed; use the new URL in future.302 Found — temporary redirect. |
| 4xx | Client error | 400 Bad Request — the request was malformed.403 Forbidden — access denied.404 Not Found — the resource does not exist on this server. |
| 5xx | Server error | 500 Internal Server Error — the server encountered an unexpected problem.503 Service Unavailable — the server is temporarily down or overloaded. |
A 404 error means the specific requested resource was not found on the server. The server is running and responding — it simply could not find the file at the requested path. Other pages on the same site may work perfectly.
Standard HTTP sends all data in plain text. Any computer along the route between the browser and the server could, in principle, read the request and response. This creates serious problems for login forms, payment information, private messages, and any other sensitive data.
HTTPS (HyperText Transfer Protocol Secure) solves this by encrypting the communication using a system called TLS (Transport Layer Security). Before the HTTP exchange begins, the browser and server perform a TLS handshake — a negotiation in which they establish a shared encryption key. After the handshake, all data is encrypted. An observer watching the network traffic sees only scrambled data.
HTTPS also provides authentication: the server presents a certificate issued by a trusted certificate authority, proving it really is the site it claims to be. This prevents an attacker from intercepting the connection and impersonating the website. Browsers indicate HTTPS connections with a padlock icon in the address bar. Modern browsers mark non-HTTPS sites as "Not Secure."
HTTPS means the connection between your browser and the server is encrypted and that the server's identity has been verified. It does not mean the website's content is honest or safe. A phishing site can have a valid HTTPS certificate. Always evaluate the site itself, not only the padlock.
Location: https://example.edu/new-page. What should the browser do next?http:// without a padlock. Explain why this is a serious security concern.A browser is a software application that requests web resources, interprets them, and displays them to the user. Browsers are clients in the client-server model. They translate the raw text of HTML, CSS, and JavaScript into the visual, interactive pages that users see on screen.
1 Parse the URL
(scheme, host, path, query, fragment)
|
2 Resolve the domain via DNS
(domain → IP address)
|
3 Establish HTTPS connection
(TLS handshake with server)
|
4 Send HTTP GET request
|
5 Receive HTTP response
(status code, headers, HTML body)
|
6 Parse the HTML → build the DOM
(Document Object Model)
|
7 Fetch additional resources
(stylesheets, scripts, images, fonts)
|
8 Apply CSS
(compute how every element looks)
|
9 Execute JavaScript
(modify DOM, respond to events, fetch data)
|
10 Render the page on screen
This entire sequence often completes in under a second for simple pages. Complex pages with many resources may take several seconds. A browser is, in part, an interpreter — it reads and executes code (HTML, CSS, JavaScript) and produces a visual result. Browsers handle poorly written code gracefully: if HTML contains a mistake, the browser tries to display something reasonable rather than showing an error message. This is called fault tolerance and was a deliberate design choice in early web standards.
Browsers also sit between users and the web as security gatekeepers. They verify HTTPS certificates, block known malicious sites, enforce rules preventing one website from reading another website's data, manage cookies, and allow users to control permissions for camera, microphone, location, and notifications.
HTML (HyperText Markup Language) is the language used to describe the structure and content of a web page. It is not a programming language — it does not perform calculations or make decisions. HTML marks up content, labeling each piece as a particular kind of thing: a heading, a paragraph, a list, a link, an image, a table, a form.
HTML uses tags to mark up content — a keyword enclosed in angle brackets. Most tags come in pairs: an opening tag and a closing tag, with content between them. The opening tag, closing tag, and their content together form an element. Attributes are name-value pairs inside the opening tag that provide additional information about the element.
<!-- A paragraph element --> <p>This is a paragraph.</p> <!-- A hyperlink with href and target attributes --> <a href="chapter21.html" target="_blank">Next Chapter</a> <!-- An image with src and alt attributes --> <img src="network-diagram.png" alt="A diagram showing client-server communication" width="600">
| Element | Purpose | Example |
|---|---|---|
<h1> – <h6> | Headings, from most to least important | <h1>Chapter 20</h1> |
<p> | Paragraph of text | <p>The web is built on HTTP.</p> |
<a> | Hyperlink (anchor) | <a href="ch21.html">Next</a> |
<img> | Embeds an image | <img src="net.png" alt="Network"> |
<ul> / <ol> | Unordered / ordered list | Contains <li> items |
<table> | Data table | Contains <tr>, <th>, <td> |
<form> | User input form | Contains <input>, <button> |
<header>, <nav>, <main>, <footer> | Semantic landmark regions | Communicate page structure to browsers and screen readers |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chapter 20: The World Wide Web</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header>
<h1>Chapter 20: The World Wide Web</h1>
</header>
<main>
<p>The web is a system of linked documents and applications.</p>
<h2>20.1 The Internet and the Web Are Not the Same</h2>
<p>Most people use these terms interchangeably...</p>
</main>
<footer>
<p>MGU Computer Science Series</p>
</footer>
</body>
</html>
HTML describes what content is, not how it looks. A heading element communicates "this is the most important heading on the page" — it does not specify font, color, or size. That is CSS's job. When HTML is written to communicate meaning (not just appearance), it is called semantic HTML. Using <h1> for the main heading, <nav> for navigation, and <footer> for the footer gives browsers, search engines, and assistive technologies meaningful information about the page's structure.
HTML is a markup language. It describes content and structure. It does not perform calculations, make decisions, or repeat operations. Python, JavaScript, and Java are programming languages. HTML is not. Confusing these categories is one of the most common misconceptions in computer science education.
Read each HTML fragment and answer the questions without running code.
<nav> <a href="index.html">Home</a> <a href="chapter19.html">Chapter 19</a> <a href="chapter20.html">Chapter 20</a> </nav>
<nav> element communicate to a browser or screen reader?href attribute need to contain to link to an external website?<img src="network-diagram.png">
alt attribute.CSS (Cascading Style Sheets) is the language used to describe how HTML elements should look: their colors, fonts, sizes, spacing, positions, borders, backgrounds, animations, and responses to different screen sizes. HTML gives a page structure and meaning. CSS gives it appearance and layout.
CSS consists of rules. Each rule has two parts: a selector — which elements the rule applies to — and a declaration block — a set of property-value pairs in curly braces. Each line inside the block is a declaration: a property name, a colon, a value, and a semicolon.
/* Element selector — all h1 headings */ h1 { color: #2c4a6e; font-size: 2rem; font-family: Georgia, serif; margin-bottom: 1rem; } /* Class selector — elements with class="note" */ .note { background-color: #fffbe6; border-left: 4px solid #f0c040; padding: 1rem; } /* ID selector — the element with id="main-heading" */ #main-heading { text-align: center; } /* Descendant selector — links inside nav elements */ nav a { text-decoration: none; color: #2c4a6e; }
| Property | Controls | Example Value |
|---|---|---|
color | Text color | #333333, blue |
background-color | Background fill | #f5f5f5, white |
font-family | Typeface | Arial, sans-serif |
font-size | Text size | 16px, 1.2rem |
margin | Space outside element | 1rem, 0 auto |
padding | Space inside element | 0.5rem 1rem |
display | Layout behavior | block, flex, grid |
border | Outline around element | 1px solid #ccc |
The "cascading" in Cascading Style Sheets refers to how CSS resolves conflicts when multiple rules apply to the same element. CSS uses a system of specificity: more specific selectors override less specific ones. ID selectors (#id) are more specific than class selectors (.class), which are more specific than element selectors (p, h1). Rules defined later in a stylesheet override earlier rules of equal specificity.
Web pages are viewed on devices with vastly different screen sizes. Responsive design is the practice of writing CSS that adapts the layout to fit the available screen space. The primary tool is the media query, which applies styles only when certain conditions are met.
/* Default: three-column layout on large screens */ .container { display: grid; grid-template-columns: 1fr 1fr 1fr; } /* On screens narrower than 600px: single column */ @media (max-width: 600px) { .container { grid-template-columns: 1fr; } }
.warning {
background-color: #fff3cd;
border-left: 4px solid #ffc107;
padding: 1rem;
font-weight: bold;
}.warning? What does the dot indicate?id="alert-box". Rewrite the selector.HTML provides structure. CSS provides appearance. JavaScript provides behavior.
JavaScript is a full programming language that runs inside the browser. It can respond to user actions, change the content and styling of a page after it has loaded, communicate with servers in the background, validate form input, animate elements, and much more. JavaScript is the only programming language that all major browsers support natively.
JavaScript interacts with a page through the DOM (Document Object Model) — the browser's internal representation of the HTML document as a tree of objects. JavaScript can read and modify the DOM to change what the user sees.
// Select an element and change its text document.getElementById("status-message").textContent = "Loading complete."; // Select all elements with a class and hide them const notes = document.querySelectorAll(".note"); notes.forEach(function(note) { note.style.display = "none"; }); // Respond to a button click document.getElementById("submit-button").addEventListener("click", function() { alert("Form submitted!"); });
JavaScript programs on the web are largely event-driven. Rather than running once from top to bottom, JavaScript code registers functions to run when specific events occur: a user clicks a button (click), presses a key (keydown), submits a form (submit), or data arrives from a server. This event-driven model is different from the sequential programs introduced in earlier chapters.
One of JavaScript's most powerful capabilities is communicating with servers in the background after a page has already loaded, without reloading the page. This technique — called fetch or AJAX — allows web applications to update specific parts of a page without a full page reload.
// Request data from a server in the background fetch("https://api.example.edu/courses") .then(function(response) { return response.json(); }) .then(function(data) { console.log(data); // Update the page with the received data });
HTML → The content and structure ("what is here")
CSS → The appearance and layout ("what it looks like")
JavaScript → The behavior and interactivity ("what it does")
Each language has a distinct responsibility. Mixing them carelessly creates pages that are harder to maintain and harder for assistive technologies to understand.
let count = 0; document.getElementById("increment").addEventListener("click", function() { count = count + 1; document.getElementById("display").textContent = "Count: " + count; });
count variable each time the event occurs?#display element contain?The web began as a system for sharing documents. Today it is also a platform for full-featured software applications. A website primarily delivers content — articles, product pages, portfolios, documentation — and the user mostly reads and navigates. A web application (or web app) allows the user to do something: edit a document, compose an email, process a payment, play a game, collaborate with others in real time.
Examples of web apps include Google Docs, Gmail, GitHub, Figma, Trello, online banking portals, e-commerce checkout systems, video streaming controls, and learning management systems. These use JavaScript far more heavily than simple websites. Much of the logic that would traditionally run on a server now runs in the browser.
Single-Page Applications (SPAs) load a single HTML file once and then use JavaScript to update the page dynamically as the user interacts with it. The URL may change, and content appears and disappears, but the browser never does a full page reload. Gmail is a well-known example.
Frameworks such as React, Vue, and Angular are JavaScript libraries that help developers build complex web applications by providing organized patterns for managing page structure, state, and updates. These frameworks are not part of the web standard but have become standard tools in professional web development.
Web apps communicate with servers through APIs (Application Programming Interfaces) — defined sets of URLs that return data (usually in JSON format) rather than HTML pages. The web app's JavaScript code requests data from the API and uses it to update the page.
| Domain | What It Covers | Example Technologies |
|---|---|---|
| Front-end | Work done in the browser: HTML, CSS, JavaScript, user interface, accessibility, performance | HTML, CSS, JavaScript, React, Vue |
| Back-end | Work done on the server: request handling, databases, data processing, authentication | Python, Node.js, Ruby, Java, SQL |
| Full-stack | Work across both front-end and back-end | Any combination of the above |
A search engine is a system that indexes the web and allows users to find pages by entering search terms. Search engines operate automated programs called crawlers (or spiders) that follow links from page to page across the web, downloading and indexing each page's content. Starting from a set of known URLs, the crawler discovers new pages by following every link it finds.
The index is a massive database mapping words and phrases to the pages where they appear. When a user enters a search query, the search engine ranks relevant pages by measures of relevance and quality. Search Engine Optimization (SEO) is the practice of designing pages to rank highly in search results. Good SEO begins with well-written, useful content and semantic HTML — descriptive titles, meaningful headings, clear URL structures, and fast loading times.
Search engines crawl and index publicly accessible pages. Pages requiring login, pages instructing crawlers not to visit them (via a robots.txt file), content behind paywalls, and database-driven content only accessible through search forms are generally not indexed. This unindexed portion of the web is sometimes called the deep web.
Web accessibility means designing and building web pages so that people with disabilities can use them effectively. Disabilities that affect web use include visual impairments (blindness, low vision, color blindness), motor impairments (difficulty using a mouse or keyboard), auditory impairments, and cognitive differences.
Screen readers are software programs used by people who are blind or have low vision. A screen reader reads page content aloud and allows the user to navigate by headings, links, and other structural elements. For a screen reader to work well, HTML must be semantic and complete: headings in logical order, images with descriptive alt text, form inputs with clear labels, and links that describe their destination.
Keyboard navigation is important for users who cannot use a mouse. Interactive elements must be reachable and usable with a keyboard alone.
The Web Content Accessibility Guidelines (WCAG) are an international standard for web accessibility. They are organized around four principles:
Perceivable — Information must be presentable in ways all users can perceive.
Operable — Interface components must be operable by all users.
Understandable — Information and interface must be understandable.
Robust — Content must work with current and future assistive technologies.
Accessibility is not an optional feature. It is both an ethical responsibility and, in many contexts, a legal requirement.
Web hosting is the service of providing the infrastructure — servers, power, internet connections, storage — that keeps websites running. Options range widely.
| Hosting Type | Description | Suitable For |
|---|---|---|
| Shared hosting | Many websites share one physical server. Inexpensive, limited performance and control. | Small, low-traffic websites |
| VPS hosting | Isolated environment on shared hardware. More control and better performance. | Medium-traffic sites |
| Dedicated server | A physical server for one customer. Maximum control; highest cost. | High-demand applications |
| Cloud hosting | Distributed across many servers. Flexible and scalable. | Large websites and web apps |
| CDN | Delivers content from servers geographically close to each user, reducing latency. | Static assets, global traffic |
Domain registration (obtaining a name like example.edu) is separate from hosting. A domain registrar stores DNS records mapping the name to the server's IP address. Registration typically involves an annual fee. You can register a domain with one provider and host with a completely different one.
<h1>, then <h3>, then <h2>. What problem does this create, and for whom?The internet is the global network infrastructure. The web is one service that uses it. Email, video calls, and gaming also use the internet but are not the web.
HTML is a markup language. It describes content and structure. It does not perform calculations, make decisions, or repeat operations. JavaScript is the programming language of the web.
HTTPS means the connection is encrypted and the server's identity is verified. It says nothing about the honesty or safety of the site's content. Phishing sites can and do use HTTPS.
A 404 means the specific requested resource was not found. The server is running and responding. Other pages on the same site are likely working fine.
CSS controls the entire visual presentation: position, size, spacing, layout, responsiveness to screen size, animations, visibility, and print formatting. It is a sophisticated language with hundreds of properties.
The fragment identifier is never sent to the server. The browser uses it locally after the page loads to scroll to a specific element. The server receives only the scheme, host, path, and query string.
https, http).example.edu, translated to an IP address by DNS.?, containing key-value parameters passed to the server or page.#, identifying a location within the page. Never sent to the server.
1 User types URL in browser
|
2 Browser parses URL
(scheme: https | host: example.edu | path: /chapter20.html)
|
3 Browser contacts DNS resolver
"What is the IP address of example.edu?"
|
4 DNS resolver returns IP address
"example.edu → 203.0.113.47"
|
5 Browser establishes HTTPS connection to 203.0.113.47
(TLS handshake: browser and server agree on encryption key)
|
6 Browser sends HTTP GET request
GET /chapter20.html HTTP/1.1
Host: example.edu
|
7 Server processes request, finds file
|
8 Server sends HTTP 200 OK response
Content-Type: text/html
[HTML document in body]
|
9 Browser parses HTML, discovers linked resources
(CSS file, images, JavaScript)
|
10 Browser sends additional requests for each resource
|
11 Browser applies CSS, executes JavaScript
|
12 Page is rendered and displayed to user
Questions: (1) At which step is DNS involved? (2) At which step does encryption begin? (3) Why does the browser send additional requests after step 8? (4) What status code would appear in step 8 if the file did not exist?
+-------------------------+---------------------------+---------------------------+
| HTML | CSS | JavaScript |
+-------------------------+---------------------------+---------------------------+
| Describes WHAT is here | Describes HOW it looks | Describes WHAT it does |
| Structure and content | Appearance and layout | Behavior and interaction |
| | | |
| Headings, paragraphs, | Colors, fonts, spacing, | Responds to clicks, |
| links, images, forms, | sizes, positions, | validates forms, |
| tables, lists | animations, breakpoints | fetches data from server |
| | | |
| <h1>Chapter 20</h1> | h1 { color: #2c4a6e; } | btn.addEventListener( |
| <p>The web is...</p> | p { line-height: 1.6; } | "click", handleClick) |
+-------------------------+---------------------------+---------------------------+
| | |
+-------------- Combined in a browser ---------------+
|
Rendered web page on screen
alt attribute on an <img> element? Who benefits from it being present and descriptive?For each URL, identify the scheme, host, path, query parameters (if any), and fragment (if any).
https://docs.mgu.edu/cs/chapter20http://example.com/shop?item=book&qty=2https://news.example.org/article/42#commentsftp://files.example.net/report.pdfMatch each situation to the most appropriate HTTP status code.
For each task, identify whether it belongs to HTML, CSS, or JavaScript.
http://example.com/about should now be at https://example.com/about-us. What HTTP status code should the old URL return? Why does this matter for users with bookmarks and for search engines?Each item contains a mistake or misconception. Identify it and explain the correct behavior.
The developer wants this link to open in a new browser tab. What is wrong with the attribute value, and what is the correct value?
A developer intends to style all elements with the class highlight. What is wrong with this selector? What does it actually target (if anything)? Write the corrected rule.
What problem does this heading order create? Who is affected by it?
What is factually wrong about this explanation? How does the fragment identifier actually work?
Identify what is correct in this statement and what is incorrect. What does HTTPS guarantee, and what does it not guarantee?
https://shop.example.edu/products?category=textbooks&sort=price#results — identify the scheme, host, path, each query parameter, and the fragment. Which of these is never sent to the server?/courses/intro-cs/chapter20 is preferable to /page?id=84729 even if both load the same page.Location header. What should the browser do, and why is this useful for users with bookmarks?.highlight { color: red; font-weight: bold; } — What type of selector is this? How would you apply it to a specific word in a paragraph?<img src="diagram.png">. Identify the missing accessibility feature and explain who is harmed by the omission.<h1> directly to <h5>. List three types of users who would experience problems, and for each, explain which specific issue affects them.These questions draw on Chapters 1–20.
public/pages/chapter20.html. If the server's document root is public, what path would a URL need to contain to request this file?Chapter 20 described how the web works: how requests travel between browsers and servers, how pages are built from HTML, CSS, and JavaScript, and how web apps use APIs to exchange data. This understanding is essential for Chapter 21. Many of the concepts from this chapter — HTTP requests, HTTPS certificates, cookies, JavaScript, forms, and user accounts — are all targets that security practitioners must understand and protect. Chapter 21 will build directly on your understanding of how the web works to explain how it can be attacked and how those attacks are prevented, introducing threats, vulnerabilities, malware, phishing, authentication, authorization, encryption, backups, and defense in depth.