0% found this document useful (0 votes)
36 views22 pages

Unit 2

html

Uploaded by

Suresh M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views22 pages

Unit 2

html

Uploaded by

Suresh M
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

WEB PROGRAMMING BCA 4TH SEMESTER

UNIT-II

Introduction to HTML: Basic HTML – HTML document structure –


HTML tags – Basefont tag – title tag – body tag – Horizontal Rule Tag -
Text formatting tags – Character tags - Character entities
HTML Lists : Ordered List , Unordered List & Definition List –
Using colors – Using Images
Hyperlinks: Textual links, Graphical links, types of document links, anchor tag

1. INTRODUCTION TO HTML:

 HTML stands for HYPER TEXT MARKUP LANGUAGE.


 It is derived from SGML ( Standard Generalised Markup Language),
 It is developed by “TIM BERNER’S LEE” in 1990.
 It also called as Document designed language, Tag based language.
 HTML code can be written in any text editors like NOTEPAD,WORDPAD,EDIT-
PLUS etc.
 HTML can be executed in any browsers like Mozilla, Firefox,Safari etc.
 HTML is a platform independent language.
 HTMl is not a case sensitive.
 The pages are designed by using HTML, those are called as “WEB PAGES”.
 HTML web pages are static web pages.

 HTML code written in between two angular brackets. Those are called as TAGS.
That’s why it is a tag based language.
 Tag is a keyword, There are two types of tags are available in HTML.Those are
opening tags and closed tags.
Opening tags are represented as----< -------------------- >
Closing tags are represented as----- < /------------------ >
 Features of HTML:
HTML has several features. The most important features are given below:
 HTML is used to create tables .
 HTML is used to create LISTS.
 HTML is used to create Hyperlinks.
 HTML is used to create different form elements.
 HTML is use to create Frames in HTML.
 It help us to create multiple web pages in a single web page.
 It is used to add GRAPHICS and easily add IMAGES in a webpage.

 TYPES OF TAGS IN HTML:


There are three types of general tags in HTML. Those are
 Container tags
 NON-Container tags
 Special entities

RAO’S DEGREE COLLEGE M.SURESH MCA Page 1


WEB PROGRAMMING BCA 4TH SEMESTER

 Container tags:
The tags which contains both opening and closing tags.
Ex: <html……............</html>
<head>..................</head>
<body>................. </body>

 Non-Container tags:
The tags which contains only opening but not closing tags.
Ex: <hr>------Horizontal ruler tag
<br>------ Break tag

 Special entities:
The entities are used for some special purposes only,which are enclosed
with “&”(ampersand) symbol.
EX: &lt... Less than
&gt... Greater than
&nbsp..... NON breakable space.

1. Explain HTML document structure?

HTML stands for “HYPER TEXT MARKUP LANGUAGE”. It is mostly


widely used to create web pages.
 Hyper text means web pages are linked together. The link available in a web
page is called a Hyper Text.
 Markup language means ,generally HTML is s simply markup text document
with tags than tell either web browser, how to structure is to display.

STRUCTURE:
HTML document contains two parts , namely HEAD part and BODY part.
Syntax:
<!—comments-->
<html>
<head>...........</head>
<body>...........</body>
</html>
In above structure ,
<html> tags encloses the complete document structure.<head> tag
represents header.<body> tag represents the document body.
<!—comments-- > are used to describe the programs such a purpose name ,date
and author details of the document are placed. Comments ignored by the web browser.
Head part contains the information like document name, address, logos etc. Head
part contains a tag known as <title> tag.It defines the title of the webpage.Body part contains

RAO’S DEGREE COLLEGE M.SURESH MCA Page 2


WEB PROGRAMMING BCA 4TH SEMESTER

the information like running matter, and keeps the other HTML tags like <h1>,<p>,<table>
etc.
Ex:

<!—sample program-->
<html>
<head> Rao’s Degree college</head><br>
<body>Best corporate degree college in Nellore district</body>
</html>
Output:

NOTE:

ATTRIBUTE:
Attribute means, provide additional information for a particular tag. The general form of
attribute is as follows:
Attribute = ”value”
Ex: align=”center”
Color=”red”.

2. Explain HTML tags?

HTML stands for “HYPER TEXT MARKUP LANGUAGE”. It


is mostly widely used to create web pages. HTML document contains number of
tags. Some of them are:

• Heading tag

RAO’S DEGREE COLLEGE M.SURESH MCA Page 3


WEB PROGRAMMING BCA 4TH SEMESTER

• Paragraph tag
• Break tag
• Non breakable space
• Title tag

 Heading Tags:
Any document starts with a heading. You can use
different sizes for your headings. HTML has six levels of headings, which use the
elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any
heading, browser adds one line before and one line after that heading.
All heading tags are container tags.
<h1>....................................</h1> Maximum size
<h2>....................................</h2>
<h3>....................................</h3> Default size
<h4>....................................</h4>
<h5>.....................................</h5>
<h6>.....................................</h6> Minimum size

 Paragraph tag:
The <p> tag offers a way to structure your text into different
paragraphs. Each paragraph of text should go in between an opening <p> and a
closing </p> tag .

 Break tag:
Whenever you use the <br> element, anything following it starts
from the next line. This tag is an example of an empty element, where you do not
need opening and closing tags, as there is nothing to go in between them.

 Non breakable space:


By using this entity . It gives a space between the text. you
should use a nonbreaking space entity &nbsp instead of a normal space. Every
entity is enclosed with an Ampersand (&) symbol.

 Title tag:
The title tag is required in all HTML documents. And it defines
Title in browser tool bar. It displays a title for the page in search engine results.
Not use more than one title tag in an HTML document.
It is represented as <title>......</title>.It is a container tag and it
contains a opening and closing tags.

Syntax:
<html>
<head>
<title>..............</title>
</head>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 4


WEB PROGRAMMING BCA 4TH SEMESTER

<body>.................</body>
</html>

Ex:
<html>
<head>
<title>HTMLtags</title>
<h1 align=”center”> Rao’sDegreeCollege </h1>
<head>
<body>
<h2 align=”center”>It is old institute in Nellore</h2>
<p align=”center”> Established in 1984</p><br>
<p align=”center”> courses are:</p><br>
&nbsp &nbsp &nbsp &nbsp B.Sc<br>
&nbsp &nbsp &nbsp &nbsp B.Com<br>
&nbsp &nbsp &nbsp &nbsp BCA<br>
&nbsp &nbsp &nbsp &nbsp B.Sc Ls<br>
&nbsp &nbsp &nbsp &nbsp BBA<br>
<body></html>

Output:

4. Explain FONT tag in HTML?

RAO’S DEGREE COLLEGE M.SURESH MCA Page 5


WEB PROGRAMMING BCA 4TH SEMESTER

Fonts play a very important role in making a website more user


friendly and increasing content readability. Font face and color depends entirely on the
computer and browser that is being used to view your page but you can use
HTML <font> tag to add style, size, and color to the text on your website.
The font tag is having three attributes called size, color, and face to
customize your fonts. In above font tag , three attributes are used . The size attribute specifies
the size of the font. The color attribute specifies the color of the font. The face attribute
specifies the style of the font. Now the general form of font tag is as follows.
Syntax:
<font size=“value” color=“color name/hexadecimal coding”
face=“font style”>.........................</font>

Ex:
<html>
<head>
<h1 align="center"> Font tag</h1>
</head>
<body>
<h2 align="center">
<font face="Calibri" color="red" size="6"> Raos students </font><br>
<font face="Bahnschrift Light" color="blue" size="4">Sixth
semester</font><br>
<font face="Times New Roman" color="magenta" size="6">Fourth
semester</font><br>
<font face="Gautami (Headings CS)" color="green" size="5">
Font tag displays different color, styles and sizes</font>
</h2></body></html>

Output:

 5. Explain Base font tag in HTML?

RAO’S DEGREE COLLEGE M.SURESH MCA Page 6


WEB PROGRAMMING BCA 4TH SEMESTER

The <basefont> element is supposed to set a


default font size, color, and typeface for any parts of the document that are not otherwise
contained within a <font> tag. You can use the <font> elements to override the <basefont>
settings.
The <basefont> tag also takes color, size and face attributes. This tag
is supported Internet Explorer browser only .This tag is used n HEAD part of the HTML
document, and it applies the color,size and face for the whole document.
The size attribute specifies the size of the font. The color attribute
specifies the color of the font. The face attribute specifies the style of the font. Now the
general form of font tag is as follows.

Syntax:
<basefont size=“value” color=“color name/hexadecimal coding”
face=“font style”>

Ex: <html>
<head>
<basefont color=“red” size=“1” face=“arial”>
</head>
<body>
<h1>Basefont tag demo</h1>
<h2>Bcom fifth sem</h2>
<h3> web technologies</h3>
</body>
</html>

Result: Basefont tag demo


Bcom fifth sem
web technologies

6. Explain HTML colors:

In HTML we can specify a direct color name or background color to the text. The
general form is: syntax: color=“color name”
To display other than primary colors, use hexadecimal coding. It is a
combination of sixteen digits[0 1 2 3 4 5 6 7 8 9 A B C D E F] . Each hexadecimal can
preceded by #(hash)sign. In HTML hexadecimal coding is represented as “#6digits”.
Syntax:
color=“Hexadecimal coding”
color=“#6digits”

Example: color=“#112233”
color=“#aabbcc”
color=“#ee5577”

In HTML ,we use “bgcolor” attribute, it specifies a background color to the total
document. This attribute is used in body section. Other than font tag. Use a special attribute

RAO’S DEGREE COLLEGE M.SURESH MCA Page 7


WEB PROGRAMMING BCA 4TH SEMESTER

called “style”. The style attribute setting the style of an HTML document.The general form
is as follows:
Syntax:
<html element style=”property:value; property:value;.........”>
Ex: <h1 style=”align:center;color:green”>

Ex: <html>
<head>
<h1 align="center">Colors Example</h1></head>
<body bgcolor="yellow">

<h1 style="color:red"> Iam red</h1>


<h2 style="background-color:pink"> I am pink</h2>
<h1 style="color:#44dd55">I am grey</h1>
<h2 style="background-color:blue"> I am Blue</h2>
<h1 style="color:green"> I am Green</h2>
<h2 style="background-color:#bb5599"> I am magenta</h2>
</h1>
</body>
</html>

Output:

7. Explain Text formatting tags in HTML?

The text in an HTML document may be an altered in number of


ways. By using text formatting tags the look and style of the text can be changed.
The following tags are used to set various formatting features to the
text. Some of the formatting tags are:

 Bold tag: This tag is used to make the text in Bold face. It is represented as <b>. It is
a container tag.

RAO’S DEGREE COLLEGE M.SURESH MCA Page 8


WEB PROGRAMMING BCA 4TH SEMESTER

Bold tag--à <b>--------------</b>.


 Italic tag: This tag is used to make the text in Italic face. It is represented as <i>. It is
a container tag.
Italic tag--à <i>---------------</i>
 Underline tag: This tag is used to set underline to the text. It is represented as <u>. it
is a container tag.
Underline tagà <u>-------------</u>
 Subscript tag: This tag is used to set the text as subscript.(base/suffix).It is
represented as <sub>. It is a container tag.
Subscript tag-à <sub>----------</sub>
 Superscript tag: this tag is used to set the text as superscript.(power/prefix). It is
represented as <sup>. It is a container tag.
Superscript tag-à <sup>----------</sup>
 Typewriter tag: This tag is used to display the text as typewriter output. It is
represented as <tt>. It is a container tag.
Typewriter tag-à <tt>--------------</tt>
Ex:

<html>
<head>
<h1 align="center"> Satya technologies</h1>
<h2 align="center"> Hyderabad</h2>
</head>
<hr align="center" color="green" size="20%" width="30%">
<body bgcolor="magenta">
<h2 align="center">
<b><u> Courses are:</u></b> Java<br>
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp Python<br><br>
<i><u> Batches are : </u></i> Merit<br>
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp
&nbsp &nbsp &nbsp Dull<br><br>
Water formula is: H<sub>2</sub>O<br><br>
Math formula is: X<sup>3</sup>+2XY+Y<sup>3</sup><br><br>
Type writer otput is:<tt> Text formatting tags</tt>
</h2>
<body>
</html>

Output:

RAO’S DEGREE COLLEGE M.SURESH MCA Page 9


WEB PROGRAMMING BCA 4TH SEMESTER

8. Explain HTML lists?

A list is a collection of elements, which is having a particular order .


There are three types of lists in HTML. They are:
 Ordered list
 Unordered list.
 Nested list.

 Ordered list:
An ordered list is a list of elements, which is having a particular
sequence. In Html we can create a ordered list by using a tag known as <ol>. It is a
container tag , along with this tag use a sub item list tag known as <li>( list item tag).
Syntax:
<ol>
<li>------- </li>
<li>--------</li>
<li>---------</li>
</ol>

By default <ol > tag displays digits only. But the user wants other than
digits i.e, alphabets ,roman numbers . We use a special attribute called , “type”.
Syntax:
<ol TYPE=“ A/a/I/i”>
<li> --------------</li>
<li>--------------- </li>
<li>-------------- </li>
</ol>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 10


WEB PROGRAMMING BCA 4TH SEMESTER

 Unordered list:
An Unordered list is a list of elements, which is having without
any sequence. In Html we can create a unordered list by using a tag known as <ul>.
It is a container tag , along with this tag use a sub item list tag known as <li>( list item
tag).

Syntax:
<ul>
<li>------- </li>
<li>--------</li>
<li>---------</li>
</ul>
By default <ul > tag displays disc symbols only. But the user wants
other than disc symbols i.e, square, circle ,use a special attribute called , “type”.
Syntax:
<ul TYPE=“square/circle”>
<li> --------------</li>
<li>---------------</li>
<li>-------------- </li>
</ol>

 Nested List: A list contains another list is known as Nested list. By using this feature
we can present a list and sublist on the web page.
Syntax: <ol>
<li>............</li>
<li>...........</li>
<li>
<ul>
<li>.....</li>
<li>......</li>
..............
...................
</ul>
</li>
....................................
.....................................
</ol>

Ex:
<html>
<head>
<h1 align="center" style="background-color:pink"><font color="red">HTML
Lists</font></h1> </head> <hr>
<body bgcolor="yellow">

RAO’S DEGREE COLLEGE M.SURESH MCA Page 11


WEB PROGRAMMING BCA 4TH SEMESTER

<font color="green">
<h1>
<b><u>Inventor:</u></b> Charles Babbage<br>
<i><u>parts:</u></i><ul type="square">
<li>Input Device</li>
<li>CPU
<ol type="A">
<li>ALU</li>
<li>CU</li>
<li>MU</li>
</ol>
</li>
<li>Output Device</li>
</ul> </font></h1></body></html>
Output:

9. Explain Character tags in HTML?

The tag is applied to an individual character is known as “ character tags”. There


are two types of character tags in HTML. They are:
 Logical character tags
 Physical character tags.

 Logical character tags:


This tag describes how the text is being used not necessarily, how it is
formatted. Some of the logical character tags are:
 Citation tag: This tag is used to make the text in italic face. It is represented
as <cite> . It is a container tag.
<cite>...............</cite>---Italic
 Delete tag: This tag is used to display the text with a line through it> It is
represented as <del>. It is a container tag.
<del>...............</del>.---------strike

RAO’S DEGREE COLLEGE M.SURESH MCA Page 12


WEB PROGRAMMING BCA 4TH SEMESTER

 Insert tag: This tag is used to display the text with underline. It is represented
as <ins>. It is a container tag.
<ins>...........</ins>------------underlined
 Emphasize tag: This tag is used to display the in italic face. It is represented
as <em>. It is a container tag.
<em>.........</em>------------Italic
 Strong tag: This tag is used to make the text in strong face. It s represented as
<strong> . It is a container tag.
<strong>............</strong>------Bold.

 Physical character tags:


This tag controls how the characters are formatted. some of the physical character
tags are:

 Bold tag: This tag is used to make the text in Bold face. It is represented as <b>. It is
a container tag.
Bold tag--à <b>--------------</b>.
 Italic tag: This tag is used to make the text in Italic face. It is represented as <i>. It is
a container tag.
Italic tag--à <i>---------------</i>
 Underline tag: This tag is used to set underline to the text. It is represented as <u>. it
is a container tag.
Underline tagà <u>-------------</u>
 Subscript tag: This tag is used to set the text as subscript.(base/suffix).It is
represented as <sub>. It is a container tag.
Subscript tag-à <sub>----------</sub>
 Superscript tag: this tag is used to set the text as superscript.(power/prefix). It is
represented as <sup>. It is a container tag.
Superscript tag-à <sup>----------</sup>
 Big tag: This tag is used to make the text in bold face. It is represented as <big>. It is
a container tag.
Big tag <big>...............</big>

 Strike tag: This tag is used to display the text with a line through it. It is represented
as <s>. it is a container tag.
Strike tag-><s>.................</s>

Ex:

<html>
<head>
<h1 align="center">character tags</h1>
</head>
<hr>
<body>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 13


WEB PROGRAMMING BCA 4TH SEMESTER

<h1 align="center"><font color="#dd6633">


<i> web technology</i><br>
<cite>web technology</cite><br>
<b> HTML</b><br>
<strong>HTML</strong></br>
<em> BCA</em></br>
<u>web programming</u><br>
<ins>Web programming</ins><br>
<del> Rao’s college</del><br>
<s>Rao’s college</s><br>
h<sub>2</sub>O<br>
x<sup>2</sup>+y<sup>2</sup>.
</font></h1></body></html>
Output:

10. Explain HTML images?

The design and appearance of a web page is very attractive by using


images. In html images are defined with a non container tag known as “img” tag. It
represented as <img >. This tag along with a special attribute known as “src(source)”.The
value of this attribute is “URL”( uniform resource locator).

Syntax: <img src=“url”>

The image tag contains number of attributes. Some of them are:

RAO’S DEGREE COLLEGE M.SURESH MCA Page 14


WEB PROGRAMMING BCA 4TH SEMESTER

 Height and width: This attribute defines the height and width of a image in pixels.
The general form is:
<img src=”url” height=”value in pixels” width=”value in pixels”>

 Alt: This attribute defines the alternate text to the image. The general form is;
<img src=”url” alt=”alternate text”>

 Border: This attribute defines the border of the image. We can specify border
thickness in terms of pixels using this attribute. The general form is:
<img src=”url” border=”value in pixels”>

 Float: By using this attribute the image moves from one side to another side I,e., left
to right or right to left. The general form is:
<img src=”url” style=”float:left/right”>

 Background-image : By using this attribute to add a background image on a web


page.But, specify the background-image property on the body section. The general
form is:
<body style=”background-image:url(‘image address’)”>

Syntax:
<img src=“url” height=“value in pixels” width=“value in pixels” border=“value in
pixels” style=“float:left/right”>

Example:
<html>
<head> </head>
<body style=“background-image:url(‘flower1.jpg’)”>
<h1 align=“center”>
<font color=”blue”>
Image example
</font>
</h1>
<img src=“flower2.jpg” height=“100” width=“50”
border=“value” style=“float:right”>
</body>
</html>

Output:

RAO’S DEGREE COLLEGE M.SURESH MCA Page 15


WEB PROGRAMMING BCA 4TH SEMESTER

11. Explain HTML entities?


The reserved characters must be replaced with character entities. The
characters that are not present as HTML elements use entities. The advantage of using an
entity name is easy to remember. The disadvantage of using an entity name is browsers may
not support all entity names, but the support browsers number is good.
Some of the HTML entities are:
ENTITY NAME DESCRIPTION RESULT
&lt Less than <
&gt Greater than >
&amp Ampersand &
&quot Double quotations “
&apos; Single quotation ‘
&nbsp Non breakable space Empty space
&cent cent ₵
&yen yen ¥
&copy copy ©
&reg Registered trade mark ®
Ex: <html>
<head>
HTML Entities
</head>
<body>
<h1 align=”center”>&lt HTML<br>
&gt HTML<br>
&quot HTML<br>
&apos; HTML<br>
&copy HTML<br>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 16


WEB PROGRAMMING BCA 4TH SEMESTER

&reg HTML<br>
&yen HTML<br>
&cent HTML<br>
&amp HTML

</h1>
</body>
</html>

Output:

12. Explain Horizontal Ruler (HR tag) tag in HTML?


Horizontal ruler tag is used to separate the content in an HTML
document. It is represented as <hr>. It is a non container tag. It contains number of
attributes , those are color,size, align and width.
ATTRIBUTE VALUE DESCRIPTION
Align Left/center/right It specifies the alignment of
the Hr tag
Color Color name/ Hexadecimal It specifies the color of the
coding HR tag
Size Value in percentages It specifies the height of the
HR tag
Width Value in percentages It specifies the width of the
HR tag

syntax:
<hr color=“ color name” align=“left/center/right” size=“value in percentage”
width=“ value in percentage”>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 17


WEB PROGRAMMING BCA 4TH SEMESTER

Example:
<html>
<head>
<h1 align="center">Rao's degree college</h1></head>
<hr color="red" size="30%" width="30%" align="center">
<body>
<h1 align="right"> web technology</h1>
<hr color="#cc66ff" size="30%" width="30%" align="right">
<h1 align="right"> Horizontal ruler tag</h1>
<hr color="#dd77bb" size="30%" width="30%" align="left">
<h1 align="left">It contains number of attributes </h1>
</body></html>

Output:

13.Hyperlinks: Textual links, Graphical links, types of document links,


anchor tag:

It is one of the most important feature in HTML. Using


Hyperlinks we can establish a link between WebPages or websites..
Generally huge information in a single lengthy webpage is not an
efficient way, because lengthy webpage will take longer time to get downloads. To
reduce the downloading time of the webpage, the information should be distributed
among multiple webpages, rather than a single webpage.
Hyperlinks can be created using a tag known as Anchor tag. It is
represented as <a>. It is a container tag.

Syntax:
<a href=“url”>
....................
....................
</a>
In above syntax the attribute “href” means “HYPERREFERENCE”. It
specifies the address of the webpage. The value ‘url’ means Uniform Resource
Locator.
 Types of hyperlinks:

RAO’S DEGREE COLLEGE M.SURESH MCA Page 18


WEB PROGRAMMING BCA 4TH SEMESTER

There are four types of hyperlinks in HTML . They are:


1. Internal Hyperlinks
2. External Hyperlinks
3. Image Hyperlinks
4. Mailto Hyperlinks
 INTERNAL HYPERLINKS:
It creates a link from one position to another position with in the same
webpage. Here we create source and target.
Syntax:
At source: <a href=“#linkname”> display text </a>
At target: <a name=“linkname”> display text </a>
 EXTERNAL HYPERLINKS:
It creates a link between different webpages or websites.
Syntax:
<a href=“url”>diplay text </a>
 IMAGE HYPERLINKS:
It creates a image hyperlink . When we click on image, it will
open the webpage that is associated with the image.
Syntax:
<a href=“image.html”> <img src=“url”>diplay text </a>
 MAILTO HYPERLINK:
It is special type of hyperlink It contains e-mail address.
Syntax:
<a href=“mailto:[email protected]”>Email address</a>

 Example program for Internal Hyperlinks:

<html>
<head>
<h1 align="center">Internal Hyperlinks</h1>
</head>
<hr align="center" size="20%" width="30%" color="green">
<body>
<h3 align="center">
<a href="#courses">Courses</a><br>
<a href="#batches">Batches</a><br>
<br><br>

<a name="courses"></a>
<b><u> courses offered</u></b>
<ol type="A">
<li>cloud computing</li>
<li>python</li>
</ol>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 19


WEB PROGRAMMING BCA 4TH SEMESTER

<br><br>
<a name="batches"></a>
<i><u> batches are</u></i>
<ul type="square">
<li>batchA</li>
<li>batchB</li>
</ul>
</h3>
</body>
</html>

Output:

 Example program for External Hyperlinks:

 Save as Externallink.html
<html>
<head>
<h1 align="center">External Hyperlinks</h1>
</head>
<hr align="center" size="20%" width="30%" color="red">
<body bgcolor="yellow">
<h1 align="center">
<a href="course.html">courses</a><br>
<a href="batch.html">batches</a><br>
</h1>
</body>

RAO’S DEGREE COLLEGE M.SURESH MCA Page 20


WEB PROGRAMMING BCA 4TH SEMESTER

</html>

 Save as course.html
<html>
<head>
<h1 align="center">External Hyperlinks</h1>
</head>
<hr align="center" size="20%" width="30%" color="red">
<body bgcolor="pink">
<h1 align="center">
<b><u> Courses Offered</u></b><br>
<ol type="A">
<li>Java</li>
<li>Python</li>
<li> Dot net</li>
<li>Ajax</li>
<li>RMI</li>
</ol>
</h1>
</body>
</html>

 Save as batch.html
<html>
<head>
<h1 align="center">External Hyperlinks</h1>
</head>
<hr align="center" size="20%" width="30%" color="red">
<body bgcolor="violet">
<h1 align="center">
<i><u> Batches are</u></i><br>
<ul type="circle">
<li>BatchA</li>
<li>BatchB</li>
<li>BatchC</li>
<li>BatchD</li>
<li>BatchE</li>
</ul>
</h1>
</body>
</html>

Output:

RAO’S DEGREE COLLEGE M.SURESH MCA Page 21


WEB PROGRAMMING BCA 4TH SEMESTER

 -----XXXXX……..‫ﯤ‬. ‫ﯤ‬. ‫ﯤ‬. ‫ﯤ‬. ‫ﯤ‬. ‫ﯤ‬. ‫ﯤ‬. -------------------‫ﯤ‬. ‫ﯤ‬. ‫ﯤ‬. ‫……ﯤ‬XXX……

RAO’S DEGREE COLLEGE M.SURESH MCA Page 22

You might also like