7-Advanced Features of HTML 1
7-Advanced Features of HTML 1
COMPUTER SCIENCE
CLASS 7
ADVANCED FEATURES OF HTML
HTML
HTML stands for Hyper Text Markup Language.
It is a standard markup language for creating web pages that contain both text and
graphics.
It is written in the form of HTML elements.
It describes the structure of a web page.
Basic Structure of a HTML document
<html>
<head>
<title>
Title of the web page
</title>
</head>
<body>
Text, which you want to show on your web page will be given here.
</body>
</html>
Head Section: It provides general information about the document. It contains the title
tag which defines a title for the page or the browser’s title bar.
Body Section: It contains the text that gets displayed on the web page along with the
other tags and attributes.
Tags: Tags are the building blocks of a web page. They have elements that define how
the information on a web page is displayed.
1
Attributes consists of two parts, a name and value.
Name value
Elements: An HTML element consists of an ON tag, the content, and an OFF tag.
a) Container elements: These elements include both ON and OFF tags.
Eg: <html>…</html>
<head>…</head>
<title>…</title>
<b>…….</b>
<center>….</center> and so on.
b) Empty elements: These elements have only ON tags. They do not have OFF
tags.
Eg: <br>
HTML tags and attribute names are not case-sensitive, so <HEAD>, <Head> and <head>
have the same meaning.
Heading Tags
They are used to define heading levels in an HTML document.
Font Tag: It is used to display the text in the user desired style of font.
Eg: <font face = “calibri” size = “4” color = “green”>
Computer Science
</font>
O/P: Computer Science
Font tag has 3 attributes namely,
1. Face : used to specify the font type(name of the font).
2. Size: specifies the size of the font.
3. Color: specifies the font color
Basic Program
<html>
<head>
<title> Success </title>
</head>
3
1. LISTS
A list is the most efficient way of presenting information.
Lists are used to display list of items/information in an organized manner.
A list can be defined as the Unordered List and Ordered List.
UNORDERED LIST
Unordered list is used to display data in any random format.
Unordered list is called as bulleted list.
<ul> is used to implement unordered list.
TYPE attribute of <ul> is used to specify the shape of bullet.
Shape can be circle - , square - or disc -
The default shape of the list will be disc.
Syntax :
<ul type = “square”> Where
<lh> List Heading </lh> <ul> - specifies Unordered list.
<li> List item1 <lh> - is used to specify list heading.
<li> List item2 <li> - is used to specify list item. It is
</ul> an empty tag.
<html>
<head>
<title> LIST1 </title>
</head>
Syntax:
<ol type = “A”>
<lh> List Heading </lh>
<li> List item1
<li> List item2
</ol>
Where
<ol> - specifies Ordered list.
<lh> - is used to specify list heading.
<li> - is used to specify list item. It is an empty tag.
<html>
<head>
<title> LIST2 </title>
</head>
5
<li> Africa
<li> North America LIST2
<li> South America Ordered List
<li> Antarctica Continents
A. Asia
<li> Europe
B. Africa
<li> Oceania C. north America
</ol> D. south america
</font> E. Antarctica
</body> F. Europe
G. Oceania
</html>
6
2. Marquee
The marquee tag helps in displaying the scrolling text on the web page.
Program 3 - Marquee
<html>
<head>
<title> MARQUEE </title>
</head>
Attributes of marquee
Syntax: <img src= “Name or path of the image file/URL” height= “value”
width= “value”>
Where,
src (source): It is an attribute of image tag, used to specify the address of the
image.
URL: Uniform Resource locator is the address of a given unique resource on web
Height and width: alters the size of the image either in the form of integer or a
percentage value.
<html>
<title> INSERT IMAGE </title>
</head>
Note:
By default image will be always inserted to the left of the web page.
To align an image to the right of the text.
Float property is used.
8
O/P: The image will appear to the right of the text.
4. Creating Paragraphs
Attributes of paragraph :
<p style=text-align:center;color:red > …. </p> paragraph will be aligned to
the center of the web page.
<p style=text-align:right;color:red > …. </p> paragraph will be aligned to
the right of the web page.
<p style=text-align:justify;color:red > …. </p> paragraph will be justified
<html>
<title> Creating Paragraphs </title>
</head>
<p style=text-align:justify;color:red>
<b> To be successful, you need to follow the path of honesty, truthfulness<br>
and hardwork. The path to success is never so easy and has no alternative.<br>
A person will have to cross all the hurdles and still be strong enough to
walk through the path.</b>
</p>
<p style=text-align:right;color:green>
<b> KIPS TEAM</b>
</p>
</BODY>
</HTML>
9
Creating Paragraphs
**********************
10