TOPIC 2.1 Create Web Page Using HTML
TOPIC 2.1 Create Web Page Using HTML
LEARNING OUTCOME
2
HTML
▪ HyperText Markup Language, commonly referred to as HTML, is
the standard markup language used to create web pages.
Hyper Text: HyperText simply means "Text within Text." A text has a link within it, is a
hypertext. Whenever you click on a link which brings you to a new webpage, you have
clicked on a hypertext.
Markup language: A markup language is a computer language that is used to apply layout
and formatting conventions to a text document. Markup language makes text more
interactive and dynamic. It can turn text into images, tables, links, etc.
Web Page: A web page is a document which is commonly written in HTML and translated
by a web browser. A web page can be identified by entering an URL. A Web page can be
of the static or dynamic type. With the help of HTML only, we can create static web
pages.
3
Structure of HTML
4
Structure of HTML
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
5
Structure of HTML
declaration to your HTML documents, so that the
browser knows what type of document to expect.
6
Structure of HTML
Metadata
8
Structure of HTML
Metadata
9
HTML Elements
CODE : OUTPUT :
<body> My First Heading
My first paragraph.
<h1>My First Heading</h1>
<p>My first paragraph.</p>
The <h1> element defines a heading.
It has a start tag <h1> and an end tag </h1>:
10
HTML Elements
BODY Color
CODE : OUTPUT :
11
HTML Elements
BODY Background
CODE : OUTPUT :
12
HTML Elements
HTML Formatting Elements
✓Bold text
• HTML also defines special elements, for ✓Important text
defining text with a special meaning. ✓Italic text
✓Emphasized text
✓Marked text
<p>This text is normal.</p> ✓Small text
✓Deleted text
<p><b> This text is bold</b>.</p> ✓Inserted text
✓Subscripts
✓Superscripts
13
HTML Elements
14
Activity 2.1 : HTML Elements
Write the coding and show the output.
15
Activity 2.2 : HTML Elements
16
HTML Elements
HTML Attributes
18
Activity 2.3 : HTML Elements
</body>
</html>
19
HTML Elements
HTML Images
21
HTML Elements
HTML Images <!DOCTYPE html>
<html>
<body>
</body>
</html>
23
HTML Heading Tags
Heading Tags
OUTPUT :
CODE :
24
HTML Tags
Marquee text
25
HTML Tags
Marquee text
<html>
<head><title>Example for HTML Marquee Tag</title>
</head>
<marquee width="40%" direction="up" height="30%">
This is sample scrolling text.
</marquee>
</html>
26
HTMLHTML
Tags Attributes
Tags
27
HTML Tags
Blink text
28
HTML Tags
Horizontal Line
• The <hr> tag defines a <!DOCTYPE html>
<html>
thematic break in an HTML <head>
<title>Horizontal line</title>
page (e.g. a shift of topic). </head>
<body>
29
HTML Tags
Horizontal Line
CODE :
OUTPUT :
30
HTML Lists
Unordered Lists
• no numerical order.
• To create an unordered list, we use the <ul> tag. This tag
comes in pairs, the content is written between opening
<ul> and closing </ul> tags.
• Each element of an unordered list is declared inside
the <li> tag.
31
HTML Lists
HTML Unordered Lists
HTML : OUTPUT :
32
HTML Lists
HTML Unordered Lists
HTML : OUTPUT :
33
HTML Lists
Ordered Lists
• listing items that are marked with numbers.
• It starts with the <ol> tag. This tag comes in pairs, the
content is written between opening <ol> and closing
</ol> tags.
• Each item in the ordered list starts with opening <li> tag
and ends with </li> closing tag.
34
HTML Lists
Ordered Lists
HTML : OUTPUT :
35
HTML Lists
Ordered Lists
HTML : OUTPUT :
36
Activity 2.4 : HTML List
37
Exercise 2.1 : Practices
Below is a fake article (article in the CIDOS). There are a number of problems with how it is
displaying: the footnotes are not a superscript, the title doesn't stand out, ect. Your goal is to fix
these problems.
38
Exercise 2.1 : Practice
39