R G6 - Unit 3 - Programme and Development
R G6 - Unit 3 - Programme and Development
Learning Objectives
Learners will learn to:
define HTML
Vocabulary
tag
attribute
hexadecimal
Let Us Start
1
Let Us Explore
We know that the internet is a network of computers connecting millions of people
worldwide and allowing them to communicate and share information. The World
Wide Web is a service provided by the internet that makes it easy to store, share and
search for information in the form of websites or web pages. HTML is the common
language that helps create these websites and web pages. Users can access these
Explore and find how web pages are created. List your findings below.
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
Get, Set, Go
3.1 What is HTML?
HTML is an abbreviation of Hyper Text Markup Language. It is the language used to
Hyper Text is a special text that, when clicked, takes you to another web page
linked to it.
The Markup Language consists of tags that mark the text inside as a certain
type. For example, a tag can mark a text as italicised or a bulleted list.
Features of HTML
HTML uses tags to define an element in a document. These tags provide
2
It allows connecting web pages using hyperlinks that connect different web
pages. Links can point to other web pages, files, or resources, enabling
It allows the developer to add images, audio, video, and other multimedia
elements directly within the content of a webpage. This enriches the user
HTML is supported by all modern web browsers, ensuring that web pages
<!DOCTYPE html>
<html>
<head>
<title> First HTML Page </title>
</head>
<body>
Welcome to HTML. My first web page.
</body>
</html>
This is the first line of an HTML document and is used to indicate to the browser
This tag tells the browser that the web page will be formatted in HTML. This is the
3
<head> … </head> tag
This tag is used to define the web page's title and other information about the HTML
document. Elements defined under the <head> tag generally do not get displayed
It is used to give a title to the web page. The title will be displayed in the title bar at
This tag encloses all the tags, attributes and information to be displayed on the web.
Page.
you to type HTML tags and view the output as a web page. You can also use a simple
text editor to create an HTML document and then open it in a browser to view it as a
web page.
saved with the extension .htm or .html. Only then will the browser consider it an
HTML file and display it as specified. You can create or edit an HTML file using any
text editor such as Notepad, Notepad++, Atom or Brackets. Some text editors have
extra features such as syntax highlighting and viewing the web page in the browser
directly.
We will use Notepad++ for typing and saving HTML files. Notepad++ is a free and
Tech Tickler
You can download and install Notepad++ from the given link.
https://notepad-plus-plus.org/downloads/
4
Once you open Notepad++, select the language as HTML as shown. This ensures the
tags are coloured correctly and the file is saved with the .html extension.
Step 2: Click the FileNew option. A new tab will open for typing the content of the
file.
Step 3: Click the File Save As option from the File menu.
Step 4: Select the folder where you want to save the file.
Step 6: Click the Save button. The file is saved with the given file name. It will have
the extension .html. Start typing the HTML code in the saved file.
Title of the webpage
5
Using Edublocks
Edublocks for HTML is a tool that allows you to create HTML documents by using
blocks instead of typing text. Similar to Scratch, it allows you to create an HTML
simplified way for users to understand and use HTML tags and its syntax.
One of the main advantages of Edublocks for HTML is that it uses the same block-
based interface as Scratch. This makes it easy for users who have experience with
Tech Tickler
Edublocks for HTML can be accessed using the given link.
https://app.edublocks.org/editor
6
Limitation of block-based coding
While Edublocks can be a great starting point for beginners to learn HTML, it has
some limitations.
It can get difficult to read and follow long pages of HTML code created using
blocks. It also becomes difficult to find and fix errors in block-based code.
saved on your computer will appear in the saved location with the icon of your
default browser. To view in the default browser, navigate to the folder where you
have saved this file and double-click on it. The HTML file will now be visible as a web
Activity 1
Perform the following tasks.
Task 1: Open Notepad++ on your computer.
7
3.5 HTML tags
Tags are instructions in an HTML document that tells the browser to do something,
such as display the text or image in a certain way. Each tag begins with a (<) and
ends with a (>). Tags are also called elements. HTML tags can be divided into two
closing tag. The tag name is enclosed in the '<' and '>' symbols. The content of the
For example, the header tag <h1> is a paired tag, its opening tag is <h1> and the
For example, the line break tag ‘<br>’ is unpaired. It inserts a line break. <p>HTML
headings are displayed in a larger size as compared to normal text. There are six
levels of headings according to their size, namely <h1>, <h2>, <h3>, <h4>, <h5>,
and <h6>. The <h1> tag displays the largest heading, while the <h6> tag displays
the smallest heading. The browser automatically adds a blank line above and below
8
HTML code Output as a web page
Paragraph tag
The <p> tag is used to add paragraphs in HTML. Each paragraph starts on a new line
and some line spacing is added before and after a paragraph on a web page.
HTML code
9
Line break tag
The <br> tag is used to begin a new line in the content on the web page. It generally
separates text into smaller, more readable portions or creates a visual break between
paragraphs. To add a line break, add the <br> tag where you want the line break to
appear. It is an empty tag, which means that it does not require a closing tag.
HTML code
Formatting tags
Text can be displayed in different formats using formatting tags in HTML.
10
HTML code
appears slightly above the normal line and is shown in a smaller size. It can be
Subscript text: The <sub> tag defines a subscript text. Subscript text appears
slightly below the normal line and is shown in a smaller size. This tag can be
11
HTML code
line on a web page. This is an empty tag, so it does not require a closing tag. It is
HTML code
12
Output as a web page
Comments tag
Comments are codes not executed by the browser; therefore, they are not shown on
the web page. They can add personal notes or descriptions in the HTML document.
Activity 2
Create an HTML page that contains information on ‘Chemical equations’.
o Paragraph tag
o HR tag
o Comments tag
13
3.6 Attributes of a tag
HTML tags can also contain attributes. Attributes are extra bits of information used
to define some specific characteristics of a tag. Attributes are placed inside the
opening tag. Each attribute has two parts- name and value. The tag gives instructions
for doing something, while its attributes decide how it should be done. Let’s see the
For example, the align attribute can be used with the <body>,<P>, <HR>or heading
tags to specify the alignment of text. There are four values that can be used for the
text: This attribute specifies the default text colour for the entire web page.
The value of this attribute should be a valid colour name or colour code of the
code that represents different colours using alphabets and numbers ranging
14
o Using the colour name
HTML code
Red #FF0000
Yellow #FFFF00
White #FFFFFF
Blue #0000FF
Green #00FF00
15
HTML code
bgcolor: This attribute specifies the background colour of the entire web
page. The value of this attribute should be a valid colour name or colour code.
HTML code
16
background: This attribute specifies an image that will be used as the
background for the entire web page. The value of this attribute is the file
HTML code
17
HTML code
Activity 3
Refer to the code of the web page created in Activity 2 and perform the given tasks.
Make use of the following attributes to improve the look of the web page:
o align (to specify the alignment of the text)
o bgcolor (to add background colour)
o text (to change the text colour)
Use different attributes of the <hr> tag to divide the web page in different
sections.
18
3.7 Creating lists
A list is organising and presenting information as a group of related items. It makes
the content easy to read and understand. You can create different lists using HTML:
to create an ordered list. Each item in the list is specified by the <li> tag.
list item
19
HTML code Output as a web page
Unordered lists
In an unordered list, the items do not appear in a numbered sequence; instead, a
bullet appears before each item. The type attribute decides the style of the bullet. An
20
Attribute of the <ul> tag
Unit Review
1. HTML is an abbreviation of Hyper Text Markup Language. It is the language
3. There are various ways to create an HTML document – using a text editor and
edublocks.
4. You can create or edit an HTML file using any text editor, Notepad++.
blocks.
21
6. To view in the default browser, navigate to the folder where you have saved
9. HTML tags can be divided into two types: paired and unpaired.
10. Header tags are used to display headings and subheadings on a web page.
12. The <br> tag is used to begin a new line in the content on the web page.
13. Formatting tags make the text bold, italic and underlined.
16. The <hr> tag in HTML stands for ‘horizontal rule’ and is used to insert a
19. Attributes are extra bits of information used to define some specific
characteristics of a tag.
21. You can create different lists using HTML: ordered lists and unordered lists.
22
b. What is the file extension to save an HTML document?
i. .txt
ii. .html
iii. .htm
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
__________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
________________________________________________________________________________________
23
c. What are attributes in HTML? Explain their use.
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
___________________________________________________________________________________
Lab Activity
Q1. Write an HTML code to display the formulas below on a web page.
(a+b)³ = a³+3a²b+3ab²+b³
Q2. Create a web page on ‘My Dream School’ using the instructions given below.
An introduction with the highest level of heading and any two formatting tags
24
Resources
https://www.w3schools.com/html/
Reference Material
https://www.youtube.com/watch?v=x9bTBcron78
25