0417 · 21.2Create a web page
Cambridge IGCSE Information and Communication Technology (0417) · Topic 21, Website authoring · 14:56
Practise this topic
Real past-paper questions on create a web page, with their mark schemes. Free with an account.
57 more Information and Communication Technology videos like this one
With a CIE Buddy account: every video in syllabus order, past-paper practice on each topic, and an AI tutor for anything unclear.
In this video
- 0:00HTML structure and relative paths. Explains HTML document structure, elements, attributes, folders and why relative paths keep local resources working.
- 2:18Stylesheets and head settings. Covers attached stylesheet order, metatags, viewport settings and default hyperlink targets in the head.
- 4:22Body content and reusable styles. Explains headings, lists, classes, div containers and inline styles for organising and formatting page content.
- 5:59Tables, images and media. Shows how to build tables, size cells, add accessible images, preserve aspect ratios and embed audio and video.
- 9:24Hyperlinks, bookmarks and worked task. Explains links and bookmarks, then applies relative paths, image sizing, alt text and targets in a worked page task.
- 12:22Checking work and key recap. Reviews common exam errors, evidence requirements and the key relationships between structure, paths, metadata and links.
Transcript: Create a web page
HTML structure and relative paths
0:00A web page can show the correct words yet still have missing images, stretched video and links that fail on another computer. These problems often come from how its parts are connected. A successful page needs meaningful structure, suitable settings and dependable paths to its resources. We will build those connections through a small club website. Hypertext Markup Language, or H T M L, is the language used to describe the content and structure of web pages.
0:25It is used in the content layer, which holds the page structure and its information. Tags identify elements such as headings, paragraphs, tables and images. A browser interprets these instructions and displays the resulting page. An element is a part of a web page identified by markup tags. Most elements have an opening tag, some content and a closing tag. An attribute supplies additional information about an element. In this example, the language attribute identifies English, while the heading element marks the main heading.
0:56The document declaration on the first line tells the browser to use current H T M L. The head section contains information about the page that is not displayed within the page itself. By contrast, the body section contains the content displayed in the browser window. Notice that the page title belongs inside the head. The browser shows that title on its tab, while the main heading appears within the page.
1:18A file is a named collection of information stored together. A folder, in turn, is a container used to organise files and other folders. Our club page is inside the pages folder, while its pictures and media occupy neighbouring folders. This arrangement matters because the browser needs directions from the page to each resource. A relative file path gives the location of a file starting from the folder of the file that refers to it.
1:41An absolute file path, in contrast, gives the full location, starting from the drive of one computer or from a web address. In the relative example, two dots and a slash tell the browser to go up one folder, out of pages. The path then enters the images folder and names the picture. Absolute file paths must not be used for hyperlinks to locally saved web pages and objects. Such a path points to a drive and folder on the author’s own computer.
2:07When the website is copied to a web server or another computer, that drive and folder do not exist there. The links and images then break, while relative paths keep working because the folder structure moves with the site.
Stylesheets and head settings
2:18Cascading Style Sheets, or C S S, is the language used to specify the presentation of web pages. An attached stylesheet is a separate file of formatting rules that is linked to a web page. Here, two link elements attach two stylesheets, and each relationship attribute says the file is a stylesheet. Each h ref attribute holds a relative path that moves up one folder before entering the styles folder.
2:41The order of the links sets the hierarchy of the stylesheets. When two attached stylesheets set the same property for the same element, the later attached stylesheet overrides the earlier one. So attach the general stylesheet first and the club stylesheet second, as the task requires. The club colours then replace any matching general colours, and the video on using stylesheets covers the rest of the cascade. A metatag is a tag in the head section that gives information about the web page to browsers and search engines.
3:09The first metatag uses the char set attribute to define the character set, here U T F eight. This tells the browser how to turn the stored bytes into letters, so accented letters and symbols appear correctly. Every other metatag on the board pairs a name attribute with a content attribute. The name attribute says which kind of information the metatag holds, and the content attribute holds its value. A description metatag gives a short summary of the page that search engines can show in their results.
3:39Keywords list the words that search engines use to match the page to a search. The author metatag records the name of the person who created the web page. The viewport is the area of the screen in which a web page is visible. Its metatag makes the web page display on all devices. It sets the page width to the width of the device’s screen and the starting zoom to one.
3:59Without it, a smartphone shows a tiny version of the full desktop page. The base element sets the default target window for every hyperlink on the page. Here, the target underscore blank makes each link open in a new window or tab. A hyperlink with its own target attribute overrides this default for that one link. Keeping the default in the head gives the whole page consistent link behaviour.
Body content and reusable styles
4:22The body can contain text, headings, paragraphs, lists, tables, images, sound clips and video. Heading levels express a hierarchy, with h one above h two and h three. Use the paragraph tag for a block of ordinary text. Their predefined browser styles provide an initial appearance, which a stylesheet can change. An ordered list presents items in a sequence, usually with numbers. Items in an unordered list, in contrast, are marked with bullets.
4:49Each entry uses the list item tag, l i, inside either kind of list. Choose an ordered list when sequence matters, such as booking instructions. For equipment to bring, an unordered list shows that the entries have equal standing. A class is a named set of style rules that applies only to elements given that class name. The class attribute applies that name to an element. Here, the notice class is applied to a division and a separate paragraph.
5:15Both receive the same rules from the attached stylesheet, which keeps repeated formatting consistent. The div tag groups a section of content into one container. Applying a class to that container lets one rule style the whole group. Individual elements can also receive their own classes, as the list does here. The div itself gives the group structure, and its styling determines the visible effect. An inline style is formatting written in the style attribute of one element’s opening tag.
5:43The example applies square bullets directly to the unordered list, so styles can be applied to lists as well as to text. An inline style overrides a conflicting rule in an attached stylesheet. Use the required class names and settings exactly, because each one connects to a specific instruction.
Tables, images and media
5:59A table is an arrangement of cells in rows and columns. Each cell is the space at the intersection of a row and a column. Tables structure related information so readers can compare corresponding entries. In this timetable, the day, time and activity stay aligned, which helps visitors find the correct session. The table tag contains the whole table. Each table row tag, t r, starts a new row. Inside a row, a table header tag, t h, holds a heading cell, while a table data tag, t d, holds an ordinary entry.
6:30Browsers display header cells in bold, centred text unless a stylesheet changes them. The column span attribute makes a cell extend across several columns. Our top heading spans three columns because the table has three columns. Row span, in turn, extends a cell down several rows. Saturday spans two rows, so the next row supplies only the time and activity cells. A pixel is the smallest individual picture element in a bitmap image.
6:57Table and cell sizes can be set in pixels for a fixed size, or as percentages of the available space. Here, the table uses eighty per cent of the page width. The day cell uses twenty-five per cent of the table width. This alternative sets a table width of six hundred pixels and a heading cell width of one hundred and fifty pixels. The heading cell is also forty pixels high.
7:18A pixel size stays the same on every screen, while a percentage size grows and shrinks with the window. Check the browser display, because long content can make a cell larger than the size you set. Row span and column span describe the structure of a table. Styles control its presentation, including dimensions, borders and spacing, and the schedule class can supply consistent formatting for the timetable. Tables are also used to structure the elements of a whole web page.
7:44An image in one cell and its description in the next stay side by side and aligned. The cell sizes then fix where each item sits. The image element uses its source attribute to locate a picture. Alternative text is a textual description that communicates an image’s purpose or content. The alt attribute supplies this description for screen readers and whenever the image cannot be displayed. Describe the useful information shown, so someone without the picture can still understand it.
8:12Aspect ratio is the relationship between an image's width and height. Suppose the original picture measures twelve hundred pixels by eight hundred pixels. Reducing its width to six hundred halves that dimension. Set the height to four hundred to keep the same relationship, so the picture is not stretched or squashed. Sound clips use the audio element, while the video element embeds moving images. Their source attributes identify the media files.
8:35Including the controls attribute displays playback controls such as play, pause and volume. The width and height attributes set the video’s display size, so keep the source video’s aspect ratio when setting them. Controls and autoplay are attributes that work simply by being present in the tag. To remove the controls, leave the controls attribute out, as in the second line. The autoplay attribute starts the video as soon as the page loads.
9:00Many browsers only autoplay a video that is muted, so the third line adds the muted attribute. Test the result in the browser. Alternative text belongs on images through the alt attribute. For video, give a short text description beside the player and fallback text inside it. The example also includes a short audio summary. These descriptions help visitors who cannot use the embedded media.
Hyperlinks, bookmarks and worked task
9:24A hyperlink is text or an image that, when selected, takes the user to another location. That location can be a bookmark on the same page, another page, a website or a new email. The anchor element, the a tag, creates the hyperlink. Its h ref attribute gives the destination, and the text or image between the opening and closing tags becomes the part the user selects. A bookmark is a named location within a web page that a hyperlink can jump to.
9:49One method gives an existing element an I D attribute with a unique value, as the visit times heading does. Another method places an empty anchor with its own id, as the first line does for the top of the page. Each id must be used only once on the page. To link to a bookmark, the h ref holds a hash symbol followed by the id. Selecting View visit times therefore jumps to the visit times heading, and Back to top returns to the first line.
10:14The same idea works for a bookmark on another page when the hash symbol and id follow that page’s file name. Check the spelling and letter case of the id, because they must match exactly. A Uniform Resource Locator, or U R L, is the address of a resource on the web. The external website link uses a complete U R L, which is correct for a site on the internet.
10:35Our contact page is a locally stored page in the same folder, so its link uses a relative path. The email link uses mailto, which opens a new message addressed to info at example dot com. The target attribute specifies where the linked page opens. Underscore self opens it in the same window, while underscore blank opens it in a new window or tab. A target with a name, such as club info, opens a window with that name.
11:00Later links with the same target name open in that same window. Our worked task creates a separate visit page using the existing website resources. Start by identifying where the new document will be saved. Its location determines the relative image path and contact link. Then separate the browser title from the visible heading, because they occupy different sections even when their wording matches. Create the document structure and save the page in the required folder.
11:26Put Garden visit inside the title element in the head. Add the same wording as an h one heading inside the body. Total accuracy means matching the required content character for character, so check spelling and capitalisation against the task. The image path goes up from pages before entering images. A width of three hundred is one quarter of twelve hundred. Apply the same scale factor to eight hundred, which gives a height of two hundred.
11:50Insert the required alternative text exactly. These settings provide the correct resource, proportions and accessible description. The contact page is beside the new page, so its filename alone is the relative destination. Place the required text inside the anchor and set the target to underscore self for the same window. Save the completed document, then open it in a browser. Follow the link and check that the image appears with the expected proportions.
12:14A browser check confirms the visible result, while the H T M L itself confirms hidden settings such as alternative text and targets.
Checking work and key recap
12:22Check that table contents fit their cells and that list markers match the requirement. Use relative paths for every locally saved page and object. Keep filename spelling and letter case consistent with the stored resources. Marks are most often lost on details the examiner can check in the code. An absolute path such as one starting with a drive letter gains no mark, even when the page works on your own computer.
12:45Others go on a title or heading not copied exactly and on stylesheets attached in the wrong order. An image is stretched when its width and height are not scaled by the same factor. Missing alt text, the wrong target and a bookmark id that does not match its link cost marks too. Practical papers provide source files and have no internet access. A screenshot is an image captured from all or part of a screen.
13:08Capture required screenshots in an Evidence Document and include your name, centre number and candidate number on every printout. Answers naming a brand gain no marks, so demonstrate the required feature or action. The head section contains information about the page that is not displayed within the page itself. The body section, in contrast, contains the content displayed in the browser window. So the title, stylesheet links and metatags go in the head.
13:33Headings, text, tables, images and links go in the body. An absolute file path points to a drive and folder on the author’s own computer. When the website is uploaded to a web server, that location does not exist, so the pages and images are not found. Relative paths, in contrast, start from the folder of the current page. The whole website folder can therefore be moved or uploaded, and every link still works without being edited.
13:57The char set metatag defines the character set, so the browser displays every character correctly. A description metatag gives a summary of the page that search engines show in their results. The author of the web page is recorded by the author metatag. Finally, the viewport metatag makes the web page display on all devices, by matching the page width to the device’s screen. To create a bookmark, give the destination element an I D attribute with a unique value, such as visits.
14:25Then make an anchor whose h ref is a hash symbol followed by that id. Selecting the anchor’s text moves the browser straight to the bookmarked element. A dependable page connects meaningful structure with correctly located resources. Head settings describe the page, while body elements organise what visitors see. Classes connect elements to reusable formatting, and anchors connect visitors to destinations. Understanding those relationships makes each editing decision purposeful and makes the finished website easier to check.