Learning path · Level 1 · Tutorial 1

How Browsers Display Web Pages

Explain how a browser obtains and displays a web page, and distinguish the responsibilities of HTML, CSS, and JavaScript.

  • Level: Beginner
  • Duration: 8 min
  • 5 steps
Start tutorial Back to the path
How Browsers Display Web Pages

Step 1 of 5

Meet the Browser and the Server

Learn the roles of the browser and server in a simple request-response flow.

Browser: the client

Two roles in a page visit

When you open a web page, the browser is the application that works for you. In this role, it is called a client.

The browser obtains web resources, interprets them, and displays the page. A server is a computer system that receives the browser’s requests and sends resources back.

A browser labeled client is on the left and a server is on the right, connected as two roles in obtaining a web page.

The browser acts as the client; the server supplies requested resources.

The basic exchange

Request, response, then display

A simplified successful page visit has a short exchange:

  1. The browser sends a request to the server.
  2. The server sends a response containing resources.
  3. The browser uses those resources to display the page.

To render means to display a page from its resources.

A diagram shows a browser on the left sending a Request to a server on the right, then receiving a Response and displaying a Maple Library page.

The browser requests resources, receives a response, and then renders the page.

Who creates the visible page?

Resources are not a screenshot

The server generally does not send a finished screenshot of the page. Instead, it sends resources that the browser can interpret.

The browser produces the visible result on your screen. This is why the browser is responsible for displaying the page after the response arrives.

A server sends a bundle of web resources to a browser, and the browser turns them into a visible Maple Library page.

The server returns resources; the browser creates the visible page from them.

Check your understanding

Put the flow in order

Arrange these events from first to last in a successful page visit.

  1. The browser (client) sends a request to the server.
  2. The browser interprets the returned resources and displays the page.
  3. The server returns a response with resources.

Step 2 of 5

Read a Web Address

Identify the scheme, hostname, and path in a simple HTTPS URL.

Locate the address parts

A URL is an address

Before making a request, a browser reads a URL (Uniform Resource Locator). A URL is an address that tells the browser how and where to access a resource.

Use this illustrative Maple Library address throughout this step. You do not need to visit it:

https://library.example/books/index.html

Three parts of one URL

An address bar shows https://library.example/books/index.html divided into scheme, hostname, and path.

Read the URL from left to right: scheme, hostname, then path.

Decode the Maple Library address

What each component means

Each component answers a different question about the resource the browser will request.

Maple Library URL components

The Maple Library URL is an illustrative address.

A URL component describes the address; it does not describe every detail of how a server is implemented.
ComponentValue in the exampleWhat it identifies
schemehttpsThe access method; HTTPS provides secure communication with a server.
hostnamelibrary.exampleThe named web destination.
path/books/index.htmlThe resource requested at that destination.

Tip

Do not assume a folder layout

A path can resemble folders, but it does not prove that physical folders with those names exist on the server. It is the part of the address used to identify the requested resource.

Check your URL reading

Read the URL precisely

Match each entry to its correct label or outcome. For the last entry, the browser is still contacting the same named destination but requests a different resource.

Tap an item and then its matching pair.

Step 3 of 5

Separate Structure, Presentation, and Behavior

Separate page content and structure, visual presentation, and custom behavior in a Maple Library page.

See the roles together

Three responsibilities, one page

A displayed page can involve three primary responsibilities:

  • HTML provides content and structure. For Maple Library, that includes the heading Maple Library and the paragraph Find your next book.
  • CSS controls presentation. It can make the heading green and increase the spacing without changing those words.
  • JavaScript can add custom behavior. It can update a counter after someone activates Select book.

When a browser uses these resources to display a page, it renders the page.

What changes—and what stays the same

Three versions of a Maple Library page: default content, the same content with a green heading and more spacing, and a button that changes a visible selection counter from zero to one.

HTML supplies the content, CSS changes its appearance, and JavaScript can create the custom counter update.

Defaults, built-in behavior, and extra resources

What is optional?

A browser can render an HTML page even when its author provides no CSS or JavaScript. The browser supplies a basic default appearance for the content.

CSS and JavaScript are optional additions, not requirements for every page. A browser also has built-in behavior: it can follow an ordinary link without author-provided JavaScript.

A page may reference extra CSS or JavaScript resources, which the browser can request separately. However, a page does not need all three technologies, and they do not have to exist as three separate files.

Optional resources and built-in behavior

A comparison diagram: the browser displays a plain HTML Maple Library page with its default appearance and follows an ordinary link. A second view shows optional styling and a button counter, with separate browser requests for referenced CSS and JavaScript resources from a server.

HTML can display with browser defaults. Referenced CSS and JavaScript can be requested separately, while ordinary link-following is built into the browser.

Tip

Keep the counter in context

When Select book changes Books selected: 0 to Books selected: 1, that is an on-page update. This example does not mean that the selection was saved as server data.

Check the JavaScript claim

Quick check

True or false: A browser can follow an ordinary link without author-provided JavaScript.

Apply the distinction

Classify the page features

Match each Maple Library feature to its primary responsibility.

Tap an item and then its matching pair.

Step 4 of 5

Compare Local Files and Server Pages

Distinguish a browser opening a local HTML document from requesting the main document through a server.

Open locally or request from a server

Two sources for a main document

A browser can display an HTML document from two different starting points.

With the hosted Maple Library address, https://library.example/books/index.html, the browser requests the main document from a server. With file:///learning/maple-library/books/index.html, the browser opens the main document from local storage on the learner’s computer.

The file address is an illustrative local address; its exact form can vary by operating system. In both cases, the browser interprets the HTML and renders it: it displays a page from its resources.

Where the browser gets the main document

A comparison of a browser opening a local HTML file from computer storage and requesting a hosted HTML document from a server. Both browser views display Maple Library and Find your next book.

The source changes, but the browser still interprets HTML and renders the page.

Compare the starting point

The important difference is the source of the main document. A local file starts on the computer that opens it. A hosted page starts with a browser request to a server.

Main-document comparison
Address exampleMain document comes fromMain server request?
https://library.example/books/index.htmlA serverYes
file:///learning/maple-library/books/index.htmlLocal storage on the computerNo

What opening a local file does—and does not—mean

Local does not always mean offline

Opening a local file does not publish it. The document remains on that computer; opening it does not send it to a server or make it available to other people.

A local HTML document can still reference resources online. For example, a page may need an online image, stylesheet, or script. If that resource is unavailable, the page may not work or look complete while offline. Local-file access does not guarantee that every page resource is available offline.

Local, published, and fully offline are different

A three-part diagram: a computer opens a local HTML document without sending it to a server; a separate server provides a page to several browsers as a published resource; and a browser with a local HTML document also requests an additional resource online.

A local main document is not automatically published, and it can still depend on resources requested online.

Tip

Three different ideas

Keep these ideas separate:

  • Local main document: the browser opened the HTML from the computer.
  • Published page: a server makes a resource available for browsers to request.
  • Offline page: every resource needed for the intended result is available without an online request.

A page can be local without being published, and local without being fully offline.

Quick check

Check the offline claim

True or false: If a browser opens a local HTML file, the entire page must work offline.

Apply the comparison

Explain the difference

Compare these two addresses:

A. https://library.example/books/index.html
B. file:///learning/maple-library/books/index.html

For each one, state where the browser gets the main HTML document. Then explain why opening B neither publishes the document nor guarantees that the full page works offline.

Write at least 120 characters (0/120).

Step 5 of 5

Explain a Complete Page Visit

Bring URL parts, resource flow, technology roles, and the local-file alternative together in one Maple Library scenario.

Trace the Maple Library scenario

One hosted page visit

Use one Maple Library visit to connect the ideas. In https://library.example/books/index.html, the scheme is https, the hostname is library.example, and the path is /books/index.html.

The browser is the client. It sends a Request to the server named by the hostname. The server sends a Response with page resources. The browser then renders the page: it displays a page from its resources. HTML supplies structure, CSS controls presentation, and JavaScript can add an on-page update.

Diagram of a browser requesting the Maple Library page from a server and rendering its HTML, CSS, and JavaScript resources, alongside a local file opening directly from a folder.

A hosted page uses a browser-to-server Request and server-to-browser Response. A local main document opens from the computer instead.

Classify what the browser displays

Technology check

Match each page feature to the technology primarily responsible for it.

Match the Maple Library features to their primary technology.

Tap an item and then its matching pair.

Apply the whole model

Explain the complete visit

Using the Maple Library scenario, write a concise four-part explanation:

  1. Label the scheme, hostname, and path in https://library.example/books/index.html.
  2. Describe the Request and Response between the browser/client and server, then say what the browser does with the returned resources.
  3. Classify the heading and paragraph, the green heading with increased spacing, and the counter update after Select book is activated.
  4. Contrast this visit with opening file:///learning/maple-library/books/index.html as the main document.

Use the terms browser, client, server, Request, Response, and render.

Write at least 180 characters (0/180).

Ready to create a local page

Summary

Key ideas

  • A URL’s scheme, hostname, and path guide a hosted page visit.
  • The browser is the client: it sends a Request, receives a Response, and renders returned resources.
  • HTML supplies structure, CSS controls presentation, and JavaScript can create custom on-page behavior.
  • A file: address opens the main HTML document locally; it does not publish that document.

Tutorial completed

Congratulations! You completed: How Browsers Display Web Pages

You can now explain how a browser displays a hosted or local page. Next, you will create and inspect your own local HTML page.

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate