🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Web & Software Development › HTML, CSS, and JavaScript for Web Development › Lesson 1
TEC-WEB46-02 · Lesson 1 · 10 clock hours · theory

How the Web Works: Clients, Servers, and Browsers

Objective. Students explain the client-server model, the HTTP request/response cycle, and how a browser parses and renders HTML, CSS, and JavaScript.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

How the Web Works: Clients, Servers, and Browsers

The Client-Server Model

Every time you load a web page, two kinds of computers are involved: a client and a server. The client is the device you are using — your laptop, phone, or desktop — along with the software running on it, typically a web browser. The server is a computer (or cluster of computers) located somewhere on the internet that stores the files and data making up the website.

The relationship is straightforward: the client asks for something, and the server responds. This is called the client-server model. Neither side can do the other's job. The browser does not store the website permanently; the server does not display anything to a user. Each plays a distinct role.

Domain Names and DNS

Before a browser can contact a server, it needs to know the server's numerical address, called an IP address (for example, 93.184.216.34). People, however, use human-readable names such as `example.com`. The Domain Name System (DNS) acts as the internet's phone book: it translates a domain name into the corresponding IP address.

When you type a URL into the browser's address bar, the browser first checks its own cache. If the address is not there, it contacts a DNS resolver — usually provided by your internet service provider or a public DNS service — which looks up and returns the correct IP address. Only after this lookup can the browser open a connection to the server.

HTTP and the Request-Response Cycle

HTTP (HyperText Transfer Protocol) is the agreed set of rules that clients and servers use to communicate. Most sites today use HTTPS, the secure version, which encrypts the data in transit using TLS (Transport Layer Security). This encryption protects users from having their data intercepted — a real-world safety concern whenever sensitive information such as passwords or payment details is involved.

The browser sends an HTTP request to the server. Every request includes:

The server processes the request and sends back an HTTP response. Every response includes:

How the Browser Renders a Page

Receiving the HTML file is only the beginning. The browser must parse and render that file before the user sees anything. This process follows a defined order:

1. HTML parsing — The browser reads the HTML and builds the DOM (Document Object Model), a tree structure representing every element on the page.

2. CSS parsing — As the browser encounters `<link>` tags or `<style>` blocks, it fetches and parses CSS, building the CSSOM (CSS Object Model).

3. Render tree construction — The DOM and CSSOM are combined into a render tree that includes only the elements that will actually be displayed.

4. Layout — The browser calculates the size and position of every element.

5. Paint — Pixels are drawn to the screen.

6. JavaScript execution — When the browser meets a `<script>` tag, it pauses HTML parsing by default, fetches and executes the script, then continues. This is why placing scripts at the bottom of the `<body>` or using the `defer` attribute is a common best practice — it prevents JavaScript from blocking the initial render.

Static vs. Dynamic Websites

A static website serves the same pre-built HTML, CSS, and JavaScript files to every visitor. The content does not change unless a developer manually updates the files. Personal portfolios and simple informational sites are often static.

A dynamic website generates content on the server (or in the browser) in response to each request. A news site that shows different articles to different users, or an e-commerce site that displays your shopping cart, is dynamic. Dynamic sites typically involve server-side languages (such as Python or Node.js), databases, and APIs.

Professional and Safety Considerations

Understanding HTTPS is not just academic. As a developer, you are responsible for ensuring that any site handling user data uses HTTPS. Serving sensitive content over plain HTTP exposes users to man-in-the-middle attacks, where an attacker intercepts and reads or modifies traffic. Most browsers now warn users when a site lacks a valid TLS certificate, and search engines may rank unencrypted sites lower. Always obtain and configure a valid certificate for production sites.

Additionally, be careful with status code handling: a server that reveals detailed error messages (such as stack traces) on a 500 response can expose internal details to attackers. In production, log errors server-side and return generic messages to the client.

Key terms10

ClientA device and software (typically a web browser) that requests resources from a server over a network.
ServerA computer that stores resources and responds to client requests by sending back data such as HTML files.
DNS (Domain Name System)A distributed system that translates human-readable domain names (such as example.com) into numerical IP addresses that computers use to locate each other.
HTTP (HyperText Transfer Protocol)The application-layer protocol defining how clients and servers exchange messages on the web; HTTPS is the encrypted, secure version.
HTTP MethodA keyword in an HTTP request that indicates the desired action; common methods include GET (retrieve) and POST (submit data).
Status CodeA three-digit number in an HTTP response indicating the result of the request, such as 200 (OK), 404 (Not Found), or 500 (Internal Server Error).
DOM (Document Object Model)A tree-structured representation of an HTML document that the browser constructs during parsing; JavaScript can read and modify the DOM to update the page.
Static WebsiteA website whose files are pre-built and served identically to every visitor, without server-side content generation per request.
Dynamic WebsiteA website that generates or personalizes content at request time, typically using server-side programming and a database.
TLS (Transport Layer Security)A cryptographic protocol that encrypts data exchanged between client and server, forming the basis of HTTPS and protecting users from data interception.
In class: Annotated diagram activity: students draw and label the full path of a browser request from URL entry to rendered page, identifying DNS, HTTP methods, status codes, and rendering steps. · Guided reading from MDN Web Docs 'How the Web Works' series followed by a structured note-taking exercise using a provided graphic organizer. · Whole-class discussion comparing static vs. dynamic websites using live examples; students categorize five real sites as static or dynamic with written justification.
Materials: MDN Web Docs (developer.mozilla.org), browser (Chrome or Firefox), whiteboard/projector, graphic organizer handout, CompTIA ITF+ Official Study Guide (CertMaster chapter on software and web concepts)
Check: Exit-ticket quiz of 10 multiple-choice questions covering HTTP methods, status codes, rendering order, and client-server vocabulary; pass mark 70%.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CompTIA ITF+ — Software and Web Concepts
1. Which component of the internet infrastructure translates a human-readable domain name into an IP address?
CompTIA ITF+ — Software and Web Concepts
2. A web developer submits a form that sends user data to a server for processing. Which HTTP method is most appropriate for this action?
CompTIA ITF+ — Software and Web Concepts
3. A user navigates to a page that has been permanently moved to a new URL. Which HTTP status code should the server return?
CompTIA ITF+ — Software and Web Concepts
4. During browser rendering, which step immediately follows construction of both the DOM and the CSSOM?
CompTIA ITF+ — Software and Web Concepts
5. A developer notices that a `<script>` tag placed in the `<head>` is slowing initial page display. Which attribute added to the `<script>` tag allows the HTML parser to continue without waiting for the script?
CompTIA ITF+ — Software and Web Concepts
6. Which of the following best describes the security risk of serving a login page over plain HTTP instead of HTTPS?
CompTIA ITF+ — Software and Web Concepts
7. A web server returns an HTTP status code of 500. What does this indicate?
CompTIA ITF+ — Software and Web Concepts
8. A portfolio website serves identical HTML, CSS, and image files to every visitor and requires a developer to manually edit files to change content. How is this site best classified?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.