Plus 2 Cs CHP 5
Plus 2 Cs CHP 5
Lists in HTML
There are three kinds of lists in HTML - unordered lists, ordered lists and definition lists.
Unordered Lists
Unordered lists or bulleted lists display a bullet or other graphic in front of each item
in the list. We can create an unordered list with the tag pair <UL> and </UL> . Each item in
the list is presented by using the tag pair < LI > and </LI>.
We can customize unordered lists by setting the Type attribute to three different values:
Disc (default value), Square and Circle, which set the type of bullet that appears before each
list item.
<HTML>
<HEAD >
</HEAD >
While buying a computer, we have to consider many items. Here are some important
items to consider.
<UL>
</UL>
</HTML>
Ordered lists
Ordered list presents the items in some numerical or alphabetical order. HTML provides the
tag pair < OL> and < /OL > to create an ordered list. The items in the ordered list are presented
by <LI > tag in < OL> element.
<HTML>
<HEAD >
</HEAD >
<OL>
</OL>
</BODY>
</HTML>
Definition lists
A definition list is a list of terms and the corresponding definitions. No bullet symbol or number
is provided for the list items. The tag pair <DL> and </DL> enclose the definition lists. Each
term in the list is created using the <DT> tag and the <DD> tag supplies the definition of the
term.
<HTML>
Today cyber security has an immense role in the field of Internet. The following are
some of the threats that affect a computer network.
<DL>
<DD> Spam is the unsolicited e-mail sent in the hope of increasing the sales of some
product, or just for annoying people. </DD>
<BODY>
</HTML>
Nested lists
A list inside another list is called nested list. Usually unordered and ordered lists are
nested.
Eg: -
<HTML>
<HEAD>
</HEAD>
<UL>
</UL>
</UL>
</UL>
</OL>
</BODY>
</HTML>
Creating links
A hyperlink (or simply link) is a text or an image in a web page that we can click on, and move
to another document or another section of the same document. The <A> tag, called anchor tag
is used to give hyperlinks. Anything given between the tag pair <A> and </A> will be a link.
Href is the main attribute of <A> tag. The URL (address of the web page/site) is given as its
value.
There are two types of linking – internal linking and external linking.
Internal linking
A link to a particular section of the same document is known as internal linking. The
attribute Name of <A> tag is used to specify the name of a section of the web page. This
name should be prefixed with # symbol to create the link using Href attribute.
Example :
<HTML>
<HEAD> <TITLE> Internal Linking </TITLE> </HEAD>
caused by the discharge of air pollution , water pollution and land/ soil waste pollution. Studies find that
these kinds of pollution are not only seriously affecting humans but also
industrial effluents, sewage animals and plants
water and agricultural or
Air pollution
household waste. </P>
The air we breathe is an essential ingredient for our health and wellbeing.
<A Href = “# Introduction” > Unfortunately, polluted air is common throughout the world, especially in
developed countries.
Go to Introduction </A>
Water pollution
</BODY>
The water we drink is an essential ingredient for our health and wellbeing.
</HTML> Unfortunately, polluted water and air are common throughout the world.
Water pollution is caused by the discharge of industrial effluents, sewage
water and
agricultural or household waste.
. Go to Introduction
External linking
The link from one web page to another web page is known as external linking. The
URL (address of the web page/site) is given as the value for Href attribute.
<A Href = “http://www.dhsekerala.gov.in”>
The text inside the tag pair <A> and </A> will appear underlined and in different colour.
Note:
The referencing <A Href = “http://www.scertkerala.gov.in”> is an absolute URL, because it is
referring to a specific URL. On the other hand, <A Href = “image .html”> is relative reference.
Here we give the file name, 'image.html' as the URL.
If the URL of the current web page document is D:\HTML\hyperlink.html, the web browser
knows that the hyperlink <A Href = “image. Html”> points to the file image.html in the
directory D:\HTML itself.
To add music or video to the web page, <EMBED> tag is used. There is another tag
<NOEMBED> which can be used to display a text if the <EMBED> tag is not supported by
the browser. The main attribute of the <EMBED> tag is Src, which specifies the URL of the
musicor video files to be included. The other attributes are Height, Width, Align, etc.
There is another tag <BGSOUND> with which music can be played in the background while
the page is viewed.
Eg: -
<HTML>
<HEAD>
<TITLE> Embed Tag </TITLE>
</HEAD>
<BODY Bgcolor = “#DDFFFF”>
<H2 Align = “center”> Adding Music and Videos </H2>
Here is a tag <B> <1> EMBED </I> </B> with the Multimedia features. <BR>
<EMBED Src = “song1/.mp3”, Width = “300” Height = “60”>
</EMBED>
</BODY>
</HTML>
The browser window can be divided into two or more panes to accommodate different pages
simultaneously. HTML provides a tag <FRAMESET> to partition the browser window into
different sections. Each individual section is called a frame. Such a frame can contain a web
page.
Form submission
The common way to submit a Form to a server is by using a submit button to handle the
submitted form in the <FORM> Tag.
2. <HR>
3. Un ordered List
4. <DL> ‘
3.
<HTML>
<HEAD>
<TITLE> ABC Pvt.Ltd</TITLE>
</HEAD>
<BODY>
<H1> ABC Pvt. Ltd. <BR>HYDERABAD</H1>
<OL>
<LI>HealthCare</LI>
<LI>Baby products</LI>
</OL>
<OLType = “a”>
<LI>Toys</LI>
<LI>Dress</LI>
</OL>
<LI> Mens Wear</LI>
<UL>
<LI>Casuals</LI>
<LI>Formals</LI>
</UL>
</OL>
</BODY>
</HTML
5. <Form> attributes
1. Action – Here we give the name of the program (including the path) stored in the
Webserver.
2. Method – There are 2 types of methods get and post.
6.
HTML Tag Use
1. <B> To display content in Bold