Class6th - Introduction HTML 2021
Class6th - Introduction HTML 2021
COMPUTERS
HTML Basics
• HTML stands for HYPER TEXT MARKUP LANGUAGE
HTML Tags
An instruction in HTML is given in the form of tags.
Types of Tags :
➢ Container elements: The tags with opening and closing tags.
For example-<B> ,<HTML>,<Body> etc.
➢ Empty elements: The tags with only opening tag .
For example - <IMG>,<HR>,<BR>
DPS Vasant Kunj
HTML
Structural tags
Tags which define the HTML document structure are called structural tags.
The main structural tags are:-
<HTML> Tag
Every HTML document begins with a <HTML>tag.
<HEAD>Tag
specifies the head section. It contains <Title> tag.
<TITLE> tag
specifies the title of the web page and is displayed in the title
bar .
<BODY> tag
contains the main content of the web page such as the text ,
images ,lists, forms etc. DPS Vasant Kunj
HTML
HTML Attributes
Attributes help in modifying the display properties like colour , background, images,
text alignment, fonts of a tag.
BGCOLOR Changes the background color to the specified color given as its value.
e.g. < Body Bgcolor="Blue”>
Specifies the name of the image file that will be used as the background
BACKGROUND
of web page
<Body Background=”Filename .jpg/.jpeg/.gif”>
e.g. < Body Background=”texture.jpg”>
Formatting Tags
Formatting tags or text tags are used to define the format and presentation of text
in the webpage.
<FONT>tag
The font style, size and color of the text can be changed using <Font> tag.
Attributes of <Font> Tag
Explanation
Attribute Name
<BR>tag
To display text in the new line <BR> tag is used.
<BR> is empty tag.
<CENTER>tag
To display text in the centre of the web page <CENTER> tag is used.
It is container tag
<P> tag
To start a new paragraph in HTML <P> tag is used.
Closing tag for <P> tag is optional.
Attribute of the <P> tag is Align.
Style tags
Style tags are used to make text highlighted by making it bold, italics or underlined.
Three style tags are: <B>,<I>and <U>.
<B> tag
This tag makes the text appear in bold letters.<B> tag is container tag.
Syntax: <B>Text</B>
<I>Tag
This tag makes text appear as italics.<I> is container tag.
Syntax:<I>Text</I>
<U> Tag
This tag makes the text appear as underlined.<U> is container tag.
Syntax: <U>Text</U>
DPS Vasant Kunj
HTML
<SUB> TAG
This tag makes the enclosed text appear as subscript that is below the
line of text as compared to the rest of the text.
For example: Al<SUB>2</SUB> gives Al2
<SUP> TAG
This tag makes the enclosed text appear as the superscript that is above
the line of text as compared to the rest of the text.
For example: x<sup>3</sup> gives x3
<MARQUEE> tag
Marquee feature gives a moving text in the output.
Example of
<Sub><Sup><Marquee>and Comment tags