Computer Science  ·  Level 6
Web Designing
Chapter 3: Web page formatting
📚 3 Topics
⚑ What you will be able to do

By the end of this chapter, you will be able to:

  • Select the right layout elements to make your web pages look organized and professional.
  • Add layout elements correctly into your HTML documents to build a strong page structure.
  • Accurately include attributes in your layout elements to customize and enhance your web design.
  • Understand how layout choices affect the overall appearance and usability of a website.

Mastering these skills will help you create attractive, user-friendly websites that stand out in the web design trade.

Web page formatting is a fundamental skill for computer science professionals specializing in web design, as it directly influences user experience, accessibility, and the maintainability of websites. In Kenya’s dynamic digital landscape, where institutions such as banks, universities, and government agencies increasingly rely on well-structured web platforms, understanding semantic layout elements is essential. This chapter explores the core structural tags in HTML5 that organize web content into meaningful sections, facilitating both human readability and machine interpretation by search engines and assistive technologies.

3.1 Layout Elements

Web page layout elements define the structural skeleton of a webpage, enabling clear content organization and enhancing navigation. These elements, introduced in HTML5, provide semantic meaning that improves accessibility and SEO performance. Kenyan web developers working with corporate websites, e-commerce platforms, or government portals benefit from using these elements to create professional, consistent, and user-friendly interfaces.

3.1.1 <header>

The <header> element is a container for introductory content or navigational aids at the top of a webpage or section. It typically holds logos, titles, slogans, and sometimes primary navigation links, setting the tone and context for the page.

Purpose of the <header> Element

The <header> serves as the initial point of engagement for users, offering immediate context about the site or section they are viewing. Its semantic role helps screen readers announce the beginning of a page or section, improving accessibility for visually impaired users. For instance, a university website’s homepage header might include the institution’s logo, name, and a tagline that establishes credibility and brand identity.

Common Content within <header>

  • Logos and Branding: Organizations such as county governments or banks use the header to display their logos, reinforcing brand recognition.
  • Page or Site Titles: Titles clarify the current page’s purpose, aiding navigation and orientation.
  • Taglines or Slogans: These provide concise messaging about the organization’s mission or values.
  • Primary Navigation Links: Sometimes, top-level navigation menus are placed here for immediate access.
  • Search Bars: In content-heavy sites like news portals or educational platforms, search functionality is often embedded in the header.

Best Practices for Using <header>

  • Place only introductory or navigational content within <header>.
  • Avoid overloading it with excessive information to maintain clarity and fast loading times.
  • Use consistent styling across pages to reinforce site structure.
  • Ensure responsive design so the header displays effectively on mobile devices.
  • Incorporate accessible markup such as ARIA labels when necessary.

Impact on SEO and Accessibility

Search engines prioritize content within <header> tags as it typically contains key information. Proper use enhances SEO by signaling the importance of site identity and navigation. Screen readers rely on <header> to provide users with context, making web content more inclusive for people with disabilities.

3.1.2 <nav>

The <nav> element defines a block of navigation links, helping users and search engines understand which parts of the page are for site navigation. It is crucial for organizing menus and facilitating easy movement across a website.

Role of <nav> in Web Design

The <nav> element groups navigational links such as menus, tables of contents, or site maps. Kenyan web professionals designing portals for institutions like hospitals or SACCOs use <nav> to create clear pathways for users to access services, departments, or resources efficiently.

Types of Navigation Contained in <nav>

  • Primary Navigation: The main menu directing users to key sections of the site.
  • Secondary Navigation: Submenus or sidebar links offering additional pathways.
  • Breadcrumbs: Navigation aids showing the user’s location within site hierarchy.
  • Pagination Links: Navigation for multi-page content such as articles or reports.
  • Utility Navigation: Links to login, contact pages, or language selection.

Design Considerations for <nav>

  • Place <nav> in a consistent location across pages for intuitive access.
  • Use descriptive link texts to enhance usability and SEO.
  • Avoid placing non-navigation links inside <nav>.
  • Implement keyboard navigability and ARIA roles to support accessibility.
  • Optimize for mobile devices with collapsible or hamburger menus.

SEO and Accessibility Implications

Search engines use <nav> to identify important site navigation, which can influence crawl efficiency and ranking. Screen readers can quickly locate navigation landmarks, enabling users with disabilities to move through the site effectively.

3.1.3 <section>

The <section> element represents a thematic grouping of content, typically with a heading, that forms a distinct part of a webpage. It is used to divide content logically, enhancing readability and semantic clarity.

Defining the Role of <section>

<section> is ideal for chunking related information such as articles, features, or service descriptions. For example, a retail business website might use <section> tags to separate product categories or promotional offers, aiding users in scanning and locating information.

When to Use <section> vs Other Elements

  • Use <section> when content forms a distinct thematic grouping with a heading.
  • Avoid <section> for generic containers without specific thematic unity; <div> may be more appropriate.
  • Do not use <section> to wrap navigation or footer content.
  • Employ <section> for content that contributes to the document outline.
  • Ensure each <section> includes at least one heading element (<h1>–<h6>) for structure.

Structuring Content Inside <section>

  • Begin with a heading to describe the content.
  • Include paragraphs, images, videos, or other media relevant to the section’s theme.
  • Use nested <section> elements for complex documents with subtopics.
  • Maintain semantic consistency to support screen readers and SEO.
  • Apply CSS styling to visually distinguish sections while preserving semantic meaning.

Benefits for Content Management and SEO

Using <section> elements helps search engines understand the organization of content, improving indexing. Content managers at institutions like insurance firms or educational websites can update or rearrange sections without disrupting overall page structure.

3.1.4 <footer>

The <footer> element designates a footer for its nearest sectioning content or the entire page. It typically contains information about the author, copyright-related links, or contact details.

Purpose of <footer> in Web Pages

Footers provide closure and supplementary information, often including legal disclaimers, privacy policies, or social media links. For example, a hotel website’s footer might list contact information, booking terms, and links to social media profiles, offering users easy access to essential details.

Typical Content Found in <footer>

  • Copyright Notices: Indicating ownership and publication year.
  • Contact Information: Phone numbers, email addresses, physical addresses.
  • Related Links: Privacy policy, terms of service, FAQs.
  • Social Media Icons: Links to Facebook, Twitter, LinkedIn, or Instagram.
  • Credits or Acknowledgments: Developer or designer information.

Best Practices for <footer> Usage

  • Place only relevant and concise information to avoid clutter.
  • Use semantic HTML to ensure screen readers recognize footer content.
  • Keep consistent footer layout across all pages for user familiarity.
  • Ensure links in the footer are functional and up to date.
  • Design footers to be visually distinct but unobtrusive.

Accessibility and SEO Considerations

Screen readers announce the footer landmark, helping users navigate to the end of content. Search engines interpret footer content as secondary but important metadata, which can influence user trust and site credibility.

Practice Questions

  1. Explain the role of the <header> element in web page formatting and describe five types of content typically included within it. (10 marks)
  2. Discuss the importance of the <nav> element in enhancing website usability and accessibility. Provide examples of at least five types of navigation that can be enclosed within <nav>. (12 marks)
  3. Differentiate between the <section> and <div> elements in HTML5, focusing on their semantic roles and appropriate use cases. (8 marks)
  4. Identify five common pieces of information included in a <footer> and explain why each is important for a professional website. (10 marks)
The rest of this chapter
🔒

Create a free account to open more of this chapter.

Free: practical guides, quick cards, workplace scenarios and more.

Create a free account
🔒3.2 Addition of layout elements to HTML document

In computer science, particularly in web development, structuring a web page effectively is crucial for usability, accessibility, and aesthetics. Layout elements in HTML provide the framework that organizes content visually and semantically. Kenyan software de…

🔒3.3 Addition of layout element attributes to HTML document

Adding attributes to HTML elements enhances their functionality and allows developers to target elements precisely with CSS and JavaScript. In Kenya’s tech industry, where customization and efficient maintenance of web applications are key, understanding attri…

Chapter Summary

This chapter explored the fundamental layout elements used in web page formatting, focusing on the semantic tags

,
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

Create a free account
Test Yourself 16 questions Start quiz ▾
0%
0 / 2
🔒

14 more in this section.

Create a free account
Am I competent?

At the start of this chapter we promised you would be able to:

  • Select the right layout elements to make your web pages look organized and professional.
  • Add layout elements correctly into your HTML documents to build a strong page structure.
  • Accurately include attributes in your layout elements to customize and enhance your web design.
  • Understand how layout choices affect the overall appearance and usability of a website.

Tick each one you can genuinely do.

So, are you there yet?

You're competent when you can confidently do 50% or more of what this chapter promised.

Sign in to record how you're doing.