CHAPTER 01 · HTML

Websites, web pages and browsers: start with familiar things

You may have used a website to check an exam result, fill in a college form or watch a lesson. Now you will learn what you were looking at. Start with the browser, the page and its address. You do not need to know any programming words before this chapter.

Download example files (ZIP)

What you will learn

  • Tell a web page and a website apart.
  • Recognise a browser, a search engine and an address bar.
  • Understand a simple request and response.
  • Tell opening a local file apart from publishing a website.
  • Follow a small page example without needing to understand every symbol yet.

Start with a college notice

Imagine that your college puts an exam notice on a board. The notice has a heading, a date and a few instructions. A web page can present the same information on a screen. Instead of walking to the board, a student opens an address in a browser.

A web page is one document that a browser can display. A document is a piece of saved information, such as a notice or a letter. A page can include text, pictures, links and controls. A control is something you can use, such as a button or a text box.

A website is a collection of related pages and resources. Resources are the files a page uses, such as pictures or style files. A college website might have a home page, an admissions page and an exam page. Each can have its own address.

Do not judge the number of pages by the number of screens you scroll through. One long web page may need many screenfuls. Also, some websites change the displayed content without loading a completely new document. We will start with ordinary separate pages because they make the first steps easier to follow.

Browser, search engine and address bar

A browser is an application that opens web pages. Chrome, Firefox, Edge and Safari are examples. An application is a tool installed on a device, like a calculator or a text editor.

A search engine helps you find pages. You enter a question or a few words, and it offers links to possible answers. Google Search and Bing are examples. A browser and a search engine are different tools, even when the browser opens a search page automatically.

The address bar is the field near the top of the browser where a page address appears. Many browsers also let you search from that same field. If you type a complete address, the browser can open that address. If you type a question, it usually sends the question to your chosen search engine.

WordSimple meaningExample
BrowserApplication used to open pagesFirefox
Search engineService used to find pagesBing
Web pageOne document displayed by a browserA college exam notice
WebsiteRelated pages and supporting filesA college's whole site
LinkA connection you can followAdmissions on a home page
TabA place for an open page inside the browser windowOne tab for notes and another for a timetable

Read a simple web address

A URL is an address for a resource. You do not have to remember the full name, Uniform Resource Locator, before using one. Think of it as the address that tells the browser where to go.

Example fragment — use inside a complete program
https://example.com/notices/exams.html
  • https tells the browser which kind of connection to use. HTTPS protects information while it travels over that connection; it does not prove that every claim on the page is honest.
  • example.com is the domain name. It is a readable name used to reach a website.
  • /notices/exams.html is the path. It identifies the requested resource on that site.

The address above is an illustration. We are not asking you to visit a real exam notice there. Later, the links and paths chapters will explain addresses in more detail.

What happens when you open a page?

A server is a computer, or a program running on a computer, that responds to requests. For a simple website, it can send a requested HTML document. HTML is the language used to describe the page's content and structure; Chapter 2 explains it carefully.

A request asks for something. A response is what comes back. A browser may request the page document first and then request pictures and other files used by that document. Its saved copies, called a cache, can sometimes reduce how many files need to be downloaded again.

From an address to a visible page
  1. 1Enter a page address
  2. 2Browser requests the resource
  3. 3Server sends a response
  4. 4Browser builds the view

A page may request more files. A directly opened local file follows a different path: the browser reads the saved file.

The browser reads the received content and builds the view you see. This process is called rendering. You do not see the network steps happening one at a time, but they help explain why a page can take time to appear.

This is a starting picture, not every detail of the internet. Some pages are built by a server, some change in the browser, and some information may already be saved on your device.

A complete example: a reading-room notice

The text below is source code: the instructions and content written by the page author. For HTML, those instructions describe content rather than a sequence of calculations. The browser preview underneath shows the result. You will save and open your own file in Chapter 4.

reading-room.html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Reading Room Notice</title>
</head>
<body>
  <h1>Reading room update</h1>
  <p>The reading room opens at 8 am on Monday.</p>
  <p>Please carry your college identity card.</p>
</body>
</html>
Browser previewDocument title: Reading Room Notice

This preview shows the example in a browser. Save the complete code in local files to test links between pages and downloads. Same-page section links work here.

Read the result before studying the symbols. You should see one heading and two separate paragraphs. The page title is Reading Room Notice. In a normal browser tab, that title identifies the document. Our embedded preview shows the page body and displays the document title above it.

The words between <h1> and </h1> form the main heading. Each pair of <p> and </p> surrounds a paragraph. The browser uses those markers; it does not normally print them as part of the page text.

You have already separated two things: what an author writes and what a reader sees. That distinction is useful throughout web development.

Local files and published pages

A file is saved information with a name, such as reading-room.html. A folder keeps related files together. A local file is on your own device or another storage location available to it.

When you open a saved HTML file directly, the browser may show an address beginning with file:///. It reads that file instead of asking a public website for it. A plain page with no online resources can work without an internet connection.

Publishing means making your pages available through a hosting service or server. Saving a file on your laptop does not automatically publish it. Sending someone your laptop's file address will not give them access to the file on your machine.

Problem and solution: share a change in opening time

Problem: the library staff need to tell students that the reading room opens at 8 am on Monday. They want a clear notice, not an application with login or payments.

Solution: write a heading that names the notice, then a paragraph with the time and another with the requirement. The complete example above does this. HTML is enough to describe this small document. Later, CSS can change its appearance.

Check whether the notice answers three questions: what changed, when it applies and what the student should bring. A technically valid page can still be confusing if its message is incomplete.

Common mistakes and useful tips

  • Calling Google Search a browser: check whether you mean the application or the search service inside it.
  • Treating a long scrolling page as several separate pages: look at the document and its address, not just screen height.
  • Thinking a saved file is already online: opening it locally does not publish it.
  • Expecting the exact same font on every device: browser defaults and user settings can differ.
  • Learning words without using them: identify the tab and address bar in your own browser now.

Practice questions

  1. A college has home, fees and contact pages. Which word describes the collection?
  2. Explain a browser and a search engine using one example of each.
  3. In https://example.com/notices/exams.html, identify the domain and the path.
  4. Predict the visible heading in the reading-room example.
  5. You save a page on your laptop. Can a friend open it through your laptop's file:/// address on their own device?
  6. Change the notice to say that the room opens at 9 am on Tuesday. Which text would you change?
Check your practice answers
  1. It is a website. Each named document is a web page within it.
  2. Firefox is a browser application. Bing is a search service that you can use inside a browser.
  3. The domain is example.com; the path is /notices/exams.html.
  4. Reading room update. The title Reading Room Notice identifies the document separately.
  5. No. That address points to a local location, not a published copy available to your friend.
  6. Replace the time paragraph with The reading room opens at 9 am on Tuesday. Keep the surrounding paragraph tags.

Interview questions

What is the difference between a website and a web page?

A web page is one document. A website brings related pages and resources together. For example, the exam notice is one page within a college website.

What does a browser do with HTML?

It reads the document, builds a representation of its content and displays the page. It also handles things such as following links and requesting referenced resources.

Is an internet connection always needed to view HTML?

No. A self-contained HTML file can be opened locally without the internet. Resources fetched from online locations still need an available connection or suitable saved copies.

Does HTTPS guarantee that a website's information is correct?

No. It protects the connection. The content can still contain mistakes or dishonest claims, so the source of the information matters too.

Quick revision

  • A browser opens and displays pages; a search engine helps find them.
  • A website contains related pages and supporting resources.
  • A URL identifies a resource; an address can point online or to a local file.
  • A server responds to requests, and the browser renders the result.
  • Writing source code and reading the finished page are different views of the same work.
  • Saving a local file does not publish it.