Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

CHAPTER 6 – HTML

1) What is HTML?

Hyper text markup language is used to design and display web pages on the
internet with the help of web browsers.

2) What is the basic structure of an HTML document?

Structure of HTML
<HTML>
<HEAD>
<TITLE>……………………………………….</TITLE>
</HEAD>
<BODY>
………………………………………………………………..
</BODY>
</HTML>
3)What is meant by HTML tags?

Tags are special codes in an HTML documents. They are marked with angle
brackets (< and >),which is understood by web browser.

HTML Tags are two types:

1 .Container Tags

2. Empty Tags

Container Tags: These tags in an HTML document are in pairs (start and end
tag).they also known as ON tag and OFF tags. Ex:<TITLE> & </TITLE>

Empty Tags: Empty tags do not require a closing tag in an HTML document.

Ex:<BR>-line break tag

HTML document consist of <HEAD> and <BODY>


HEAD: The heading of the document is written in this.

BODY: The tag is the actual text of an HTML document.

The content written within the <TITLE> tag does not appear on the webpage

More tags in HTML

Paragraph tag

The tag defines a paragraph. Browsers automatically add a single blank line
before and after each Element.

Line Break Tag: This tag is used avoid blank spaces between the lines. <BR>
is the line break tag which is an empty tag.

Background and Text colour

Syntax:

<BODY bgcolor = “colourname ” text= “colourname ”>

Ex: <BODY bgcolor = “red” text= “yellow”>

Heading Tags:

There are six different levels of headings which vary from <H1> to <H6>.

<H1> tag defines the most important heading whereas <H6> tag defines the
least important heading.

Syntax:

<Heading tag> string of text for heading </Heading tag>

Eg: <H2> Arya Publishing Company </H2>

Superscripts and Subscripts tag

The superscripts tags are used to represent some text/data above the normal line
and the subscript tags are used to represent the text below the normal line. The
<SUP> tag defines the superscript text and the <SUB> tags explains the
subscript text.

Eg1: HTML of H2O

H<SUB>2</SUB>O

Eg2: CaCl2

CaCl<SUB>2</SUB>

Eg3: (a+b)2

(a+b)<SUP>2</SUP>

Eg4: a2 + b3 + c4

a<SUP>2</SUP>+b<SUP>3</SUP>+c<SUP>4</SUP>

Font Tags:

An HTML document provides the facility to change the font, the size and the
colour of the text. Thus the attributes of the font tag include Arial,Tahoma,
Garamond, Verdana etc.

1. Name of the font : It specifies the type of font to be used in an HTML


document
Syntax: <Font face = “Name of the font”>
Eg: <Font face = “Garamond”>
2. Size of the font: It specifies the size of the font which varies from 1 to 7.
By default, the font size of the text within the body of an HTML
document is 3.
Eg: <Font size = “6”>
3. Colour of the text : It specifies the colour of the text in an HTML
document. The colour of the text can be indicated either by giving the
colour name (i.e, red, blue, green etc. ) or by using the RGB components
(i.e, # sign followed by the six digit hexa decimal value )
Eg: <Font color = “red”>

Bold , Italics and Underline tags :

Syntax:

• To display the text in bold : <b> string of text </b>


• To display the text in italics : <i> string of text </i>
• To underline the text : <u> string of text </u>

Alignment tags:

Syntax:

• Left alignment : <p align = “left”>


• Right alignment : <p align = “right”>
• Center alignment : <p align = “center” >
• Justify : <p align = “justify”>

You might also like