Chapter 1
Chapter 1
INTRODUCTION
• In this lecture we introduce internet based programming
language which will help in creating the web
applications. The hypertext markup language [HTML]
definition, its document structure and the HTML tags will
be analyzed.
OBJECTIVES
By the end of this lecture the learners should be able to:
• Define HTML tags.
• Analyze the HTML document structure.
• Work with HTML tags.
• The following is a list of technologies associated with
web development.
– Hypertext Markup Language (HTML)
– Cascading Style Sheets (CSS)
– JavaScript and DOM scripting
– Server-side programming and database management
Hypertext Markup Language (HTML)
<body>
<p>Welcome to XHTML!</p>
</body>
</html>
<HTML, HEAD, BODY>
<?xml version = "1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">
<HTML>
<HEAD>
</HEAD>
<BODY>
This is my first Web document. This file is a simple
ASCII text file which was created on a PC using
notepad under MS Windows. As you can see the
file is shown in the display window of the Browser.
</BODY>
</HTML>
COMMENT TAG
• The first line of the code usually starts with !. It is usually for
commenting and it is an empty tag. Comment tags do not show up in
the browser window. They are ignored by the browser.
• One can tell your web browser what version of HTML being used.
• You can also use comments to explain your code, which can help
you when you edit the source code at a later date.
BODY TAG ATTRIBUTES
• BGCOLOR
• Defines the background color of the page. Colors are set
using “RGB” color codes, which are, represented as
hexadecimal values. Each 2 digit section of the code
represent the amount in sequence, of red, green or blue
that forms the color. The color setting can be expressed in
one or two ways, either by name e.g. “ blue” or as a six
digit hexadecimal number
some of the commonly used
colors:
body tag attributes
• BACKGROUND
• Defines a background image. The images get tiled in the browser. The body
element allows one to set an image as the documents background. E.g setting the
document background image to logo.gif <BODY BACKGROUND = “logo.gif”>.
• TEXT
• Defines the color of the text of the page. NB/ Make sure your background
contrasts with the text color.
• LINK
• Defines the color of hyperlinks which have yet to be selected, initial appearance.
• ALINK
• Active link, defines the color of hyperlinks as they are being clicked.
• VLINK
• Visited link, defines the color of hyperlinks which have already been visited.
Example of body tag attributes
<HTML>
<HEAD>
<TITLE>Welcome to my page </TITLE>
</HEAD>
<BODY BGCOLOR=”Blue” TEXT=”White” LINK= “Green”
ALINK= “Lightgreen” VLINK= “DarkGreen”>
The bulk of the page goes here
</BODY>
</HTML>
Text emphasis
<?xml version = "1.0"?>
Every XHTML document is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" required to have opening
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> and closing html tags.
<!-- XHTML headers -->
<html xmlns = "http://www.w3.org/1999/xhtml">
The font size of the text
<head>
<title>Web Engineering - Headers</title> between tags decreases
</head> as the header level increases.
<body>
<h1>Level 1 Header</h1>
<h2>Level 2 header</h2>
<h3>Level 3 header</h3>
<h4>Level 4 header</h4>
<h5>Level 5 header</h5> Select a header based on the
<h6>Level 6 header</h6> amount of emphasis you
</body> would like to give that text.
</html>