Class 6 Chapter 6 Introduction To HTML
Class 6 Chapter 6 Introduction To HTML
HTML
LEARNING OBJECTIVES
You will learn about:
C
1. HTML 3. HTML tags and tag attributes
2. HTML Editor 4. important HTML tags
HTML
HTML stands for Hyper Text Markup Language. Hypertext is simply a piece of text which
contain links to other texts whereas Markup Language is a way of writing style and layout
information within a text document. HTML is an example of markup language. HTML is a
simple scripting language, mainly used for developing web pages. It is easy to learn and simple
to understand.
HTML document is a plain text file that contains text and HTML tags. It is also called a
web page.
Before learning the language, the following points should be kept in mind:
HTML Editor
Before creating an HTML document, you must first learn about the HTML editor. HTML editor
is a software application required to create web pages. These web pages can be viewed using
any web browser such as Internet Explorer, Mozilla Firefox, etc.
There are several types of HTML Editors. The main types are discussed here.
WYSIWYG editor
WYSIWYG stands for 'What You See Is What You Get'. This type of HTML editor allo
lows yoyov
to create a web page without the use of the HTML tags. The content displayed onscreen durina
editing phase closely resembles the final web page. MS FrontPage and Adobe Dreamweaver are
during
examples of a WYSIWYG editor.
Text editor
To work with a text
editor, you must know Untitled- Notepad
how to write HTML that are used for
tags File Edit Format View Help
creating a web page. Notepad and WordPad <HTML>
are
examples of a text editor. <HEAD
TITLE My First web page </TITLE>
You </HEAD>
can create a web page using a text editor BODY>
HI FRIENDS LET US START ORKING IN HTML
by following a few steps:
</BODY>
1. Click </HTML>
on the Start button
All
Programs Accessories
Notepad. Fig. 6.1 Using Notepad as a text editor
2. The Notepad window
appears. Type the HTML code (Fig. 6.1).
Note: This is a sample code. You will learn Save As
CtrfeN
Fig. 6.2 Save As dialog box
Nw essuon
Open Ctrl0
Clone ab CloW
startung Internet Explorer. Browse the web without
Session.
storing data about your bro web browser
Open an InPrivate urowsing window
Page Seup-
You can use
any web
P..
Print Previe.
Ctl-P
Use an Accelerator browser, say Internet
ena
HTML Tags
HTML also called HTML tags. These denote the various elements in an HTML
markup tags are
< and >.
document. HTML tags are keywords enclosed in a pair of angular brackets, that is,
the start and end
These tags are usually paired (for example, <HTML> and </HTML>) to mark
and the
of an HTML instruction or HTML element. The first tag is known as the opening tag
with a forward slash (/)
last tag is called the closing tag. The end tag or closing tag is preceded
within the angular brackets. There are two types of tags.
end to HTML element. For example,
1. Container tags: These tags have a start and tag
an an
HTML Elements
HTML element.
The content with the start tag and the end tag is called the
typed along
element. HTML can also have nested
For example, <B> Click Start </B> is one HTML
</U> B>.
elements. For example, <B> <U> Click Start
will learn about these tags in a later
Note: The tags used here are for examples only. You
chapter.
EAG fILE
63
HTML Tag Attributes
HTML elements. They are
re alu.
always
ot atag provides additional information about the
u t e s
written in the start tlag. Attributes appear as an attribute name followed by an '= sign
Sign and t
and
double quotes, though some
then
ne attrbute valuc. Attribute valucs should be enclosed within
browsers allow single quotes also. Different attributes in the same tag are separated by
by aa space space
For exanmple, <IMG align="left">
Here, align = "left" is an attribute of the HTML element. Also, note that 'align is the attribute
Head element
This element contains information about the document. The text
and tags do not show directly
on the web It contains the HEAD
page. tag which is the first tag under the HTML tag. This in
turn can contain various other
tags such as TITLE tag (title appears in the Title Bar of the web
page), STYLE tag, etc.
The example below shows the title element that
displays the text as the title of the web page in
the Title Bar (Fig. 6.6). The text specified within the title
tag does not appear on the text area of
the web browser.
<HTML>
<HEAD> Click Start- Learning HTML- Windows Internet Explorer
<TITLE> 2 CAUsersCambridgelDesktop >|x| SpeedbitSearch
Click Start Learning HTML File Edit View Favorites Tools Help
<STITLE> Favorites Click Start- Learning HTML
<SHEAD>
<HTML>
64
Body element
This element defines the document's body. This comes after the head element. The BODY
tag
is used to display text, images, links, etc. on the web This
page. may contain several other tags
(Fig. 6.7).
<HTML> Click Start-Learning HTML -WindowsInternet Explorer
<HEAD>
<TITLE>
e cAUseraiCambridg X E Soeedeiseorch
File Edit View Favorites Tools Help
Click Start-Learning HTML
SFavorites Click Start- Learning HTML
<TITLE>
/HEAD>
Leaming HTML is an enjoyable experience!
BODY>
Learning HTML is an enjoyable
experience!
/BODY>
SHTML> Fig. 6.7 Showing text on web page using BODY tag
The space between the tags does not matter. For example,
6S
<U>Underline text</U> is same as <U>Underline text <IU
There should not be any space between letters of the tag names. For example,
ACTIVITY
Complete the following activity.
1. Open notepad and write down the coding for creating a web page on "My childhood
friends
2. Let there be some background color of your choice.
3. The text should be in green color.
4. Save the file with the name
5.
'MyFriends.html
Open the Internet Explorer or any other browser and execute your program.
GLOSSARY
BODY tag: It is used to display text, images, links, etc. on the web
page.
Container tag: It adds a start and an end tag to an HTML element.
Empty tag: It is the tag that has a Start tag only, and no
closing tags to an HTML element.
HEAD tag: It is the first element under the HTML tag that contains
information about the
HTML document.
HTML: It stands for Hyper Text Markup Language.
HTML tag attributes: It provides additional information about HTML
elements.
HTML tag: It is used to identify the program as a standard HTML
document.
HTML editor: It is a software application required to create web pages.
HTML element: It is the content typed along with start tag and end
tag.
Hypertext: It is a piece of text that works as a link.
Markup Language: It is used for writing style and layout information within a text document.
wYSIWYG editor: It allows you to create a web page without the use of the HTML tags.
TITLE tag: It displays the text that appears as the title of the web page in the Title
Bar.
(66 THL