Course Content
KM-01: Hypertext Markup Language (HTML) Basics
This module introduces learners to the foundational concepts required to begin working with HTML programming. It covers basic computer concepts, the introduction to HTML programming, suitable Integrated Development Environments (IDEs), Git and GitHub, problem-solving in programming, the life cycle for developing a solution, and an overview of the look and feel of a website. The module builds the learner’s understanding of the fundamentals of HTML as a programming language and prepares them for more detailed HTML document structure, styling, and practical web development work in later modules.
0/15
KM-02: HTML Programming Principles
This module builds on the foundational knowledge from KM-01 and focuses on the core principles of HTML programming. It introduces learners to the structure of an HTML document, including tags, elements, and attributes, and how these are used to organise and present content on web pages. The module also covers HTML data types, text formatting, tables, file and folder structures, and semantic organisation of content. In addition, learners are introduced to how web pages communicate with remote servers. By the end of this module, learners will have a solid understanding of how to create well-structured, readable, and functional HTML documents that form the backbone of web development.
0/21
KM-03: HTML and Cascading Style Sheets (CSS) Styling Principles
This module introduces learners to the principles of styling web pages using Cascading Style Sheets (CSS). While HTML provides the structure of a webpage, CSS is used to control the appearance, layout, and visual presentation. Learners will develop the ability to design visually appealing and user-friendly web pages by applying styling techniques such as colours, fonts, spacing, layouts, and responsive design. The module also introduces HTML forms, which are used to collect user input and are an important part of interactive web applications. By the end of this module, learners will be able to apply CSS styling principles to improve the readability, usability, and overall user experience of web pages.
0/7
KM-04: HTML Intermediate Programming Functionalities
This module builds on foundational HTML knowledge and introduces learners to more advanced and interactive web development features. Learners will explore how to create dynamic and interactive web pages using HTML5 functionalities and APIs, as well as how to work with multimedia, offline capabilities, and modern web technologies. The module focuses on improving user experience and preparing learners for real-world web development environments.
0/15
WM-01: Workplace Module
Introduction to Workplace Modules Workplace Modules are designed to ensure that learners: -Apply their skills in a real or simulated work environment -Demonstrate industry readiness -Perform tasks aligned with real job roles
0/1
HTML Programmer

Lesson Outcomes

After completing this lesson, learners will be able to:

  • Explain the purpose of styling in web development.
  • Describe how CSS is used with HTML.
  • Identify different ways to apply CSS to HTML.
  • Understand basic styling properties.
  • Apply simple styles to HTML elements.

Overview

HTML provides the structure of a webpage, while CSS (Cascading Style Sheets) is used to control the appearance and layout.

Styling is important because it makes web pages:

  • Visually appealing
  • Easier to read
  • More user-friendly
  • Consistent in design

This lesson introduces learners to how CSS is used to style HTML5 pages.


1. What is CSS?

CSS stands for Cascading Style Sheets.

It is used to control how HTML elements are displayed on a webpage.

CSS is used to style:

  • Colours
  • Fonts
  • Layout
  • Spacing
  • Backgrounds

2. Purpose of Styling

Styling improves the overall quality of a website.

Benefits of Styling

  • Enhances visual appearance
  • Improves readability
  • Creates consistency
  • Improves user experience

Without CSS, web pages would look plain and unstructured.


3. Ways to Apply CSS

There are three main ways to apply CSS to HTML.

3.1 Inline CSS

  • Applied directly inside an HTML tag
  • Uses the style attribute

Example:

 
<p style="color: blue;">This is blue text</p>
 

3.2 Internal CSS

  • Written inside a <style> tag
  • Placed in the <head> section

Example:

 
<head>
<style>
p {
color: blue;
}
</style>
</head>
 

3.3 External CSS

  • Written in a separate .css file
  • Linked to the HTML file

Example:

 
<link rel="stylesheet" href="style.css">
 

Key Points

  • External CSS is the most recommended method
  • It keeps code clean and organised

4. Basic CSS Syntax

CSS follows a specific structure.

Syntax:

 
selector {
property: value;
}
 

Example:

 
p {
color: red;
}
 

Explanation:

  • p → selector
  • color → property
  • red → value

5. Common CSS Properties

CSS includes many properties used to style elements.

5.1 Colour

  • Changes text colour

Example:

 
color: blue;
 

5.2 Background Colour

  • Changes background colour

Example:

 
background-color: yellow;
 

5.3 Font Size

  • Changes text size

Example:

 
font-size: 16px;
 

5.4 Text Alignment

  • Aligns text

Example:

 
text-align: center;
 

5.5 Margin and Padding

  • Margin → space outside element
  • Padding → space inside element

6. Importance of CSS in Web Development

CSS is essential because it:

  • Separates content from design
  • Improves maintainability
  • Allows consistent styling
  • Enhances user experience

Key Notes

  • CSS is used to style HTML elements.
  • It controls colours, fonts, layout, and spacing.
  • There are three ways to apply CSS: inline, internal, and external.
  • CSS uses selector-property-value syntax.
  • External CSS is the preferred method.
  • CSS improves design, readability, and user experience.
Scroll to Top