Web pages

A web page is a document that can be viewed on a web browser. It can contain text, images, sounds, animations, videos and hyperlinks to other web pages. Most web pages are written using HTML, HTML5, XML and CSS.

Diagram of a webpage and its components

Static and dynamic web pages

Web pages can be either static or dynamic.

A static website has no form of interactivity. It only uses HTML and CSS and there are no options for the user to input data.

Dynamic websites contain elements that allow the user to interact with the site. They can automatically update sections of a site based on information from other sites, applications, the user or databases. Contact forms and search boxes are basic types of dynamic interaction.

On a web page like a blog, dynamic elements might include a feed widget and RSS links to other blogs. Static elements might include the basic layout and banner for the site.

An online shop would use databases to automate the prices of products. Product details will be stored in a database on a server and the owner could update the database on the server, rather than updating the prices in HTML on a static page.

The differences between a static and a dynamic web page

A dynamic website uses HTML and CSS but it also includes scripting languages, such as JavaScript and PHP. Scripting is a form of programming designed to execute at runtime. A dynamic website can be called a web application (or web app) because it is programmed like a software application.

BBC website developer Matt Clark explains how the sport website uses dynamic scripting and databases

A software application is stored on a computer’s hard drive, but a web application is stored on a server and used through a web browser.

The client-side (or front-end) is the user interface of the application where apps are displayed in the browser using HTML, CSS and JavaScript.

The server-side (or back-end) stores and processes the bulk of the data and source code using languages such as SQL, PHP and Python.