Cyber Security  ·  Level 6
Perform Website Design And Development
Chapter 3: Develop functional website
📚 6 Topics
⚑ What you will be able to do

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

  • Ensure the website meets all functional requirements like smooth navigation, working forms, and proper media loading during testing.
  • Test and confirm that every page loads quickly, aiming for under three seconds on typical internet speeds.
  • Create a fully responsive website design that works perfectly on at least three different devices or screen sizes without any layout issues.

Mastering these skills means you can build websites that users find reliable, fast, and easy to use—key qualities for success in the web development trade!

Websites form the front line for many cyber security professionals who develop secure portals, client dashboards, and incident reporting tools. A functional website must blend effective design with robust coding to deliver user-friendly, secure, and responsive interfaces. In Kenya's growing digital economy, cyber security specialists often create websites that handle sensitive information for banks, hospitals, and government agencies, where secure coding practices are paramount. This chapter explores core HTML coding and JavaScript elements essential for developing functional, interactive websites tailored to cyber security contexts.

3.1 HTML Coding

HTML (HyperText Markup Language) is the backbone of web page structure, defining elements such as text, links, tables, forms and lists. Every page a browser shows is built from HTML elements, each written as an opening tag, its content and a closing tag. For cyber security professionals, mastering HTML is crucial to build interfaces that are functional and that also reduce vulnerabilities such as injection attacks and cross-site scripting. This topic covers the essential HTML tags and their use in creating secure, accessible web pages; JavaScript, which adds behaviour to these pages, is covered under 3.3. Example: the web team of a water and sanitation company in Nakuru builds its customer complaint page from headings, a table of recent outages and a form, all written in plain HTML.

3.1.1 Formatting tags

Formatting tags in HTML define how text and elements are presented within a web page. They allow developers to emphasise content, organise information and improve readability, which is critical when displaying security alerts or logs clearly to users.

Bold and italic text

  • <b> and <strong>: Both make text bold, but <strong> marks the text as important, which helps screen readers give weight to critical security messages.
  • <i> and <em>: Both italicise text; <em> adds stressed emphasis, useful for highlighting warnings or instructions in incident reports.
  • <u> and <mark>: <u> underlines text and <mark> highlights it, for example the key line of a password policy.

Headings and paragraphs

  • Headings <h1> to <h6>: These structure content hierarchically for users and search engines. A cyber incident report page might use <h1> for the title and <h2> for sections such as "Incident Details".
  • Paragraphs <p>: These separate blocks of text, giving clarity when presenting detailed security procedures or user instructions.

Line breaks and horizontal rules

  • <br>: Inserts a line break, useful for formatting addresses or multi-line log entries.
  • <hr>: Creates a thematic break that separates sections, such as different security advisories on one page.

Superscripts and subscripts

  • <sup> and <sub>: Display text above or below the normal line, useful for expressions such as 2⁸ in cryptography explanations.

Monospaced text

  • <code> and <pre>: <code> shows a code fragment in a monospaced font, while <pre> keeps the spacing and line breaks of a block, essential for example scripts or commands in security documentation.

3.1.2 Hyperlinks tag

Hyperlinks connect web pages and resources, enabling navigation and access to further information. In security portals, careful hyperlinking is vital to prevent phishing and malicious redirects.

Anchor tag structure and attributes

  • <a>: The anchor tag creates a hyperlink. Its href attribute gives the address the link opens.
  • target: Controls where the link opens; target="_blank" opens a new tab.
  • rel="noopener noreferrer": Stops the opened page from controlling the original window through window.opener, a common security practice for every link that opens a new tab.

Internal and external links

  • Internal links: Navigate within the same website, for example between pages of a security dashboard, using relative addresses such as reports.html.
  • External links: Connect to outside resources, such as advisories published by the national computer incident response team, using full addresses that start with https://.
  • Page anchors: A link to #section-id jumps to an element with that id on the same page, useful in long policy documents.

Email links

  • mailto: The mailto: scheme in href opens the user's email program with the address filled in, useful for reporting incidents to the IT security team.

Link styling and accessibility

  • Descriptive link text: Text such as "Download the incident form" improves usability and helps screen reader users, unlike "click here".

3.1.3 Tables tags

Tables organise data into rows and columns, essential for displaying logs, audit trails or user permissions clearly in security applications.

Table structure elements

  • <table>: Defines the table container.
  • <tr>: Creates a table row.
  • <th>: Sets a header cell, used to label columns such as "Timestamp" or "Event Type".
  • <td>: Holds a data cell.
  • <thead>, <tbody> and <tfoot>: Group the header rows, body rows and footer rows of a large table.
  • colspan and rowspan: Let one cell stretch across several columns or rows.

Caption and summary

  • <caption>: Gives the table a title, improving clarity.
  • summary: An old attribute that described table content for assistive tools; it is obsolete in HTML5 and the caption or nearby text is used instead.

Nested tables and styling

  • Nested tables: A table inside a cell can show related data, such as alerts grouped by severity, though modern pages prefer separate tables.
  • Styling: CSS is used for borders, spacing and responsiveness, important in mobile-friendly security dashboards.

3.1.4 Frames tags

Frames divide the browser window into several sections, each displaying a separate HTML document. They are obsolete in HTML5, but understanding them helps in maintaining legacy systems and in safely embedding content from other sources.

Frameset and frame elements

  • <frameset>: Replaces <body> and sets the layout of the frames, for example cols="25%,75%".
  • <frame>: Defines each frame, with a src attribute pointing to the document it shows.
  • <noframes>: Gives content for browsers that do not support frames.

Security considerations

  • Clickjacking: A page shown inside an attacker's frame can trick users into clicking hidden buttons; servers send the X-Frame-Options or Content-Security-Policy frame-ancestors header to prevent it.
  • Browser support: Modern browsers no longer support framesets in HTML5 documents, so iframes are used instead.

Iframes as an alternative

  • <iframe>: Embeds another page within a section of the current page, for example an external security advisory. The sandbox attribute limits what the embedded page can do, isolating it from the main page.

3.1.5 Forms tags

Forms collect user input, crucial for login screens, incident reporting and feedback tools. Secure form design protects against injection and data leakage.

Form element and attributes

  • <form>: Encloses the form controls; action gives the server address that receives the data and method gives the submission type, GET or POST.
  • POST for sensitive data: POST sends data in the request body, so it does not appear in the address bar, browser history or server logs.

Input types and controls

  • <input>: Takes a type such as text, password, email, checkbox, radio, number, date or file.
  • Password fields: Mask what is typed, vital for authentication forms.
  • File inputs: Allow uploading of logs or evidence files.
  • <label>: Ties a caption to its control, improving accessibility.

Select, textarea and button

  • <select> with <option>: Creates a drop-down list of predefined choices, such as incident categories.
  • <textarea>: Provides multi-line input, ideal for detailed incident descriptions.
  • <button>: Submits the form or runs a script.

Form validation and security

  • HTML5 validation attributes: required, pattern, maxlength and type="email" check input in the browser before it is sent.
  • Server-side validation: Remains essential, because browser checks can be bypassed by an attacker who sends requests directly.

3.1.6 List tags

Lists organise content logically, improving navigation and clarity in security documentation and in menus.

Ordered lists

  • <ol>: Produces a numbered list, suitable for step-by-step incident response procedures; the type and start attributes change the numbering style and first number.

Unordered lists

  • <ul>: Produces a bulleted list, effective for listing security features or risk factors; each entry is an <li> element.

Description lists

  • <dl>, <dt> and <dd>: Pair terms and their descriptions, useful for glossaries of cyber security terms.

Nested lists

  • Lists inside lists: An <ul> or <ol> inside an <li> builds multi-level structures, such as a navigation menu or a security policy with sub-clauses.
🔒3.2 SCRIPTING

Scripting is the writing of short programs, called scripts, that are interpreted at run time to make websites interactive and dynamic. A static HTML page only shows what was written into it; scripts let the page react to the user, fetch and store data, and enf…

🔒3.3 JAVA SCRIPTING

JavaScript is the scripting language of the web browser. It is supported natively by every modern browser and adds behaviour to the structure built with HTML: it reacts to clicks and typing, checks form input, changes page content without reloading and exchang…

🔒3.4 PHP

PHP is a widely used server-side scripting language essential for dynamic web development, including secure website design and development. In Kenya’s growing cybersecurity domain, professionals use PHP to create interactive, data-driven websites that require…

🔒3.5 Database Creation

In the context of cyber security, database creation is a critical step in developing a functional website that securely handles and stores sensitive information. Cyber security professionals in Kenya must design databases not only for efficient data management…

🔒3.6 Database Linkage

Linking databases to websites enables dynamic interaction with stored data, which is fundamental for functionality and user engagement. For cyber security professionals in Kenya, establishing secure and efficient database connections is vital to prevent exploi…

Chapter Summary

This chapter focused on developing a functional website by first exploring key HTML coding elements such as formatting, hyperlinks, tables, frames, forms, and lists, which form the structural foundation of web pages. It then examined scripting languages, highlighting their functions and different types that enhance website interactivity and dynamics. The discussion on JavaScript covered essential features including events, string manipulation, numerical operations, and array handling, which are critical for client-side programming. Attention was given to PHP, emphasizing its importance in server-side scripting, along with its syntax, variables, data types, operators, control structures, functions, arrays, and form processing capabilities. The chapter also addressed the creation of databases, which are vital for storing and managing website data efficiently. Finally, it covered database linkage, explaining how websites connect to databases to retrieve and manipulate information, thereby enabling dynamic content delivery and user interaction.

Self-Assessment

🔒 PDFDownload this self-assessment, with answers

A. Written Assessment

  1. What is the purpose of the <form> tag in HTML? (2 marks)
  2. Identify three common formatting tags used in HTML and explain their function. (6 marks)
🔒20 more in this section.

Chapter Examination Questions

🔒 PDFDownload these examination questions, with worked answers

SECTION A (40 Marks) - Answer ALL Questions

  1. Explain the role of HTML formatting tags in enhancing website content presentation, citing an example relevant to a cybersecurity awareness portal for a Kenyan university. (4 marks)
  2. Describe how the hyperlink tag functions in HTML and why it is critical for navigating cybersecurity resource websites. (4 marks)
🔒18 more in this section.
Flashcards 20 cards Study deck ▾
Question
1

↻ Tap card to reveal answer
🔒

18 more in this section.

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

16 more in this section.

Create a free account
Am I competent?

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

  • Ensure the website meets all functional requirements like smooth navigation, working forms, and proper media loading during testing.
  • Test and confirm that every page loads quickly, aiming for under three seconds on typical internet speeds.
  • Create a fully responsive website design that works perfectly on at least three different devices or screen sizes without any layout issues.

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.