LambdaLabTM
Computer Networks · Class 12 · Websites and Web Pages
networksweb services⏱️ 6 min read

Static and Dynamic Web PagesOptional for Computer Science

🎬 This chapter has a 12:38 video: Web Services →

Your school’s “About us” page looks the same to you, to your friend, and to a stranger in another city. Your exam result page does not. Both are web pages, and the difference is where the page is put together.

1A static web page

Static web page
A static web page is stored on the web server as a finished HTML file. The server sends that same file to everyone who asks. The content changes only when a person edits the file.

Nothing is worked out while you wait. The page was written once and put on the server, and it stays exactly that until somebody replaces it.

2A dynamic web page

Dynamic web page
A dynamic web page is built by the server each time it is requested. The server runs a program, which usually fetches data from a database, and sends back a page made for that request. Two visitors can get two different pages from the same address.
One address, two visitors

Switch the visitor. On a static page nothing changes; on a dynamic page the server builds a different page each time.

🗄️ On the web server
about.html
  <h1>About our
  school</h1>
  <p>Founded in
  1985 …</p>

One finished HTML file, written once. The server just hands it over, unchanged.

About us
sunriseschool.example/about.html
🏫 About our school

Founded in 1985, Sunrise School has 1,200 students.

Once
Page is built
No
Server runs a program
No
Uses a database
Faster
To load

Switch between Riya and Arjun: the page does not change at all. It is the same file for everyone, and it stays that way until somebody edits it.

A printed menu and a cooked meal

A static page is the printed menu on the table: one sheet, the same for every customer, changed only when it is reprinted. A dynamic page is the meal: made after you order it, from ingredients in the kitchen, and different for the next table.

3Side by side

Static web pageDynamic web page
BuiltOnce, by handEvery time it is requested
Same for everyone?YesNo — it can differ per visitor
Server runs a program?No, it just sends the fileYes
Database?Not usedUsually used
SpeedFaster to loadSlower — there is work to do first
Changing the contentEdit the HTML fileChange the data, the page follows
ExampleA school's About us pageExam results, a booking page, a news feed
“Dynamic” does not mean animated
A page with a moving banner or a slideshow can still be static: the same file, with the same animation, goes to everyone. Dynamic is about who builds the page and when, not about whether anything on it moves.
How to answer “which one would you suggest?”
CBSE asks this as a scenario almost every year. The test is one question: does the page have to be different for different people, or change by itself? Logging in, seeing your own result, booking a seat, live prices — dynamic. An unchanging notice, an address, a history of the school — static.

4From the board papers

1
Arshiya is a web developer and one of her clients wants her to design a web page to accept donations for an NGO. Which type of web page (static / dynamic) will she create?CBSE board exam 2022 (Term 2, compartment)
2 marks
▶Show the answer

A dynamic web page. Each donor enters their own details and amount, the server has to record them in a database and build a receipt for that donor, so the page cannot be the same finished file for everyone.

2
The company is planning a website which will allow students to see their results after registering themselves on its server. Out of static and dynamic, which type of website will you suggest?CBSE sample paper 2022–23 (also asked in the 2024–25 sample paper)
1 mark
▶Show the answer

A dynamic website. Every student must see their own result, so the server has to look each student up in a database after they log in and build a page for that one student.

3
Which of the following is a key feature of a static web page?
(A) Its content updates very frequently.
(B) It displays different content to different users.
(C) It loads slower than a dynamic web page.
(D) It shows the same content unless the code is manually updated.CBSE board exam 2026
1 mark
▶Show the answer

(D). A static page is a stored file, so it keeps showing the same thing until a person edits it. (A) and (B) describe a dynamic page, and (C) is the wrong way round — static pages load faster.

4
Web pages showing stock prices and weather updates change frequently, therefore such web pages are: (A) Fixed   (B) Dynamic   (C) Static   (D) DarkCBSE board exam 2025 (compartment)
1 mark
▶Show the answer

(B) Dynamic web pages. Prices and weather come from data that keeps changing, so the page has to be built again each time it is asked for.

What a web page and a website are, if you need it first, is on the Website and Web Page page.

5Check yourself

Quick Check

A page shows a spinning logo and a photo slideshow. Every visitor sees exactly the same thing. Is it static or dynamic?

Quick Check

Which of these almost always needs a database on the server?