Skip to main content
EnglandComputer ScienceSyllabus dot point

How are web pages built from HTML, CSS and JavaScript, and how do search engines rank them?

Web technologies: HTML for structure, CSS for presentation and JavaScript for client-side behaviour, the difference between client-side and server-side processing, and how search engines index and rank pages using web crawlers and the PageRank algorithm.

An OCR H446 answer on web technologies: HTML for structure, CSS for presentation and JavaScript for client-side behaviour, the difference between client-side and server-side processing, and how search engines use web crawlers and the PageRank algorithm to index and rank pages.

Generated by Claude Opus 4.813 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

OCR wants the roles of HTML, CSS and JavaScript, the difference between client-side and server-side processing, and how search engines index and rank pages using web crawlers and PageRank. Expect a "roles of HTML, CSS and JavaScript" question and a "how does a search engine work" question.

The answer

HTML, CSS and JavaScript

<!-- HTML: structure and content -->
<form id="signup">
  <input type="email" id="email" />
  <button type="submit">Join</button>
</form>

Client-side versus server-side processing

Search engine indexing and PageRank

Examples in context

A shopping site uses HTML for the product layout, CSS for the brand styling, and JavaScript to update the basket without reloading; the checkout and stock checks run server-side for security. Search engine optimisation works partly because PageRank rewards links from reputable sites. Client-side validation gives instant "password too short" feedback, while the server re-checks everything before saving. OCR links this to the client-server model of the web, to databases (server-side data access) and to security (why client code cannot be trusted).

Try this

Q1. State what CSS is responsible for in a web page. [1 mark]

  • Cue. Presentation and layout (colours, fonts, spacing, positioning), kept separate from the content.

Q2. Explain why a security check must be performed server-side rather than only client-side. [2 marks]

  • Cue. The user can view and modify client-side code (or disable JavaScript), so a client-side check can be bypassed; server-side code is hidden and cannot be altered by the user.

Q3. State what a link from page A to page B represents in the PageRank algorithm. [1 mark]

  • Cue. A vote for page B, contributing to its importance (weighted by how important page A itself is).

Exam-style practice questions

Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

OCR 20206 marksExplain the roles of HTML, CSS and JavaScript in a web page, giving an example of what each is responsible for.
Show worked answer →

Award two marks per technology for the role and an example.

HTML (HyperText Markup Language) defines the structure and content of the page using elements and tags, for example headings, paragraphs, links, images and forms; it says what the content is, not how it looks.

CSS (Cascading Style Sheets) controls presentation and layout, for example colours, fonts, spacing and positioning, keeping styling separate from content so one stylesheet can format many pages consistently.

JavaScript runs in the browser to add client-side behaviour and interactivity, for example validating a form before submission, showing or hiding content, or responding to clicks without reloading the page. Markers reward structure/content for HTML, presentation for CSS, and client-side behaviour for JavaScript.

OCR 20226 marksDescribe how a search engine uses web crawlers and the PageRank algorithm to return useful results, and state what PageRank uses to judge a page's importance.
Show worked answer →

Crawlers and indexing (up to 3): a search engine uses web crawlers (spiders) that automatically follow hyperlinks from page to page, retrieving content and adding it to a searchable index that maps keywords to the pages containing them, so searches can be answered quickly from the index rather than the live web.

PageRank (up to 3): PageRank ranks pages by importance based on the links between them, treating a link from page A to page B as a vote for B; a page is more important if many pages link to it, and a link from an already-important page counts for more. The results are ordered by relevance to the query combined with this importance score. Markers reward crawling to build an index plus links-as-votes weighted by the linking page's own importance.

Related dot points

Sources & how we know this