HTML
HTML
CSS
LEARNING
OBJECTIVE
2
INTRODUCTION
3
HISTORY OF HTML
4
TOOLS USED TO
WRITE AN HTML
DOCUMENT
HTML editor
Web browser
5
HTML EDITOR
TWO TYPES OF HTML EDITORS:-
6
WEB BROWSER
7
HTML TAGS
8
HTML TAGS
Container tags Empty tag
▪ A container tag is a tag ▪ An empty tag is the
Commands in HTML are
that needs to be known as tags. tag that need not be
closed. closed.
▪ A tag is closed by All HTML tags are ▪ It has only opening
putting a forward enclosed within angle tag
slash(/) in front of the brackets (< >)
tag name
▪ Egs:- <HI> Hello </HI> A tag can be a container ▪ Eg:- <br>, <img>
tag or an empty tag.
9
STRUCTURE OF AN HTML DOCUMENT
◼ An HTML document has two main components – HEAD and BODY.
◼ HEAD section contains the title and other information about the HTML document.
◼ BODY section contains all information that is displayed on the web page.
<html>
<head>
<title>.......</title>
</head>
<body>
..........
........
</body>
</html>
10
RULES FOR WRITING AN HTML PROGRAM
◼ The names of HTML tags are case-insensitive, which means it can be written in any
case (upper, small or mixed)
◼ Container tags must always be closed.
◼ Tag names should not have spaces.
◼ There should not be any space between < and > in a tag.
◼ When two or more tags are used the inner tag should be closed before closing the
outer tag.
11
BASIC HTML TAGS
◼ <HTML>
This is a container tag. An HTML program always begins with <HTML> tag and ends with </HTML>
tag. The complete program is written within the opening and closing of <HTML> tags.
◼ <HEAD>
<HTML> tag is followed by the <HEAD> tag. It contains the <title> tag which is used to display the
title of the web page.
◼ <TITLE>
<TITLE> tag is also a container tag. The title is displayed on the title bar of the browser window.
◼ <BODY>
This is also a container tag. It contains all the other formatting tags used in the HTML program. It is
the main portion of the webpage.
12
CREATING, SAVING AND VIEWING A WEB PAGE
13