100% found this document useful (1 vote)
27 views

HTML Programs

The document contains program code for developing various HTML programs using different objects and tags like arrays, dates, tables, styles, and variables. It includes 14 programs with the code, output and result for each program. The programs cover concepts like arrays, basic tags, boolean objects, dates, events, inline and internal styles, lists, math objects, strings, and tables.

Uploaded by

Sankaraiah Mudi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
27 views

HTML Programs

The document contains program code for developing various HTML programs using different objects and tags like arrays, dates, tables, styles, and variables. It includes 14 programs with the code, output and result for each program. The programs cover concepts like arrays, basic tags, boolean objects, dates, events, inline and internal styles, lists, math objects, strings, and tables.

Uploaded by

Sankaraiah Mudi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

D.

BHUVANESWARI

HTNO: 1 PAGE NO:

AIM

ALGORITHAM:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING ARRAYS

<html>

<head>

<title>demo of for-in statement</title>

</head>

<body BGCOLOR=BISCUIT>

<center>

<script type="text/javascript">

days=new Array();

days[0]="Sunday";

days[1]="Monday";

days[2]="Tuesday";

days[3]="Wednesday";

days[4]="Thursday";

days[5]="Friday";

days[6]="Saturday";

//document.write(i);

for(i in days)

document.write(days[i]+"<br>");

}
D. BHUVANESWARI

OUTPUT:

RESULT:

RESULT: The program is successfully completed hence the output is verified.


D. BHUVANESWARI

HTNO: 2 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING BASIC TAGS

<html>

<head>html

</head>

<body>

<b>html stands for hyper text markup language</b><br>

<i>html is used to design the web pages</i><br>

<u>html is saved as file name html</u><br>

<title>definitions</title><br>

oxyzen is defined a so<sub>2</sub><br>

general equationx<sup>2</sup><br>

<table>

<tr>

<th>Roll no

<th>Name

<th>Phone no

<th>Address

</tr>

<tr>

<td>1

<td>a

<td>5432167889

<td>kuppam

</tr>
D. BHUVANESWARI

</table>

<h1>b</h1>

<h2>b</h2>

<h3>b</h3>

<h4>b</h4>

<h5>b</h5>

<h6>b</h6>

</body>

</html>

OUTPUT:

RESULT: The program is successfully completed hence the output is verified.


D. BHUVANESWARI

HTNO: 3 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING BOOLEAN OBJECT

<html>

<body bgcolor=grey>

<script type="text/javascript">

var temp=new Boolean(false);

document.write("<b>"+"The Boolean value is:");

document.write(temp.toString());

</script>

</body>

</html>

OUTPUT:
D. BHUVANESWARI

RESULT: The program is successfully completed hence the output is verified.

HTNO: 4 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING DATE OBJECT

<html>

<head>

<title>date object</title>

</head>

<body bgcolor=wheat>

<script type="text/javascript">

var my_date=new Date();

document.write("The date is:"+my_date.toString()+"<br>");

document.write("Today's date is"+my_date.getDate()+"<br>");

document.write("This is the month of"+my_date.getMonth()+"<br>");

document.write("The current year is"+my_date.getFullYear()+"<br>");

document.write("Now,Hour="+my_date.getHours()+"<br>");

document.write("Minutes="+my_date.getMinutes()+"<br>");

document.write("Seconds="+my_date.getSeconds()+"<br>");

</script>

</body>

</html>
D. BHUVANESWARI

OUTPUT:

RESULT: The program is successfully completed hence the output is verified.


D. BHUVANESWARI

HTNO: 5 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING EVENTS

<html>

<head>

<script type="text/javascript">

function fun()

alert("you have entered"+form1.text.value);

</script>

</head>

<body bgcolor=red>

<h3>number guessing game </h3>

<form name ="form1" onsubmit=fun();>

enter some number<br>

<input type="password" name="text1">

<input type="submit" value="submit">

</form>

</body>

</html>
D. BHUVANESWARI

OUTPUT:

RESULT: The program is successfully completed hence the output is verified.


D. BHUVANESWARI

HTNO: 6 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING INLINE STYLES

<html>

<head>inline styles

</head>inline styles </title>

<h5 style="background:gray;

text -align:centre;

font-style:italic;

text-transform:uppercase;">

b.com 3year(CA)

</H5>

OUTPUT:
D. BHUVANESWARI

RESULT: The program is successfully completed hence the output is verified.

HTNO: 7 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING INTERNAL STYLES

<html>

<head>

<title>internal style</title>

<style>

Body

background-image:url("Tulips.jpg");

h1{background :green;

text align :center;

text transform :uppercase;

font-style :bold;

font-color :red;

font-weight:medium;

font-size:12;

text-decoration:underline;

h2{

color:blue;

margin:5cm;

background-color:#ff0000;

background-image:url("Tulips.jpg");

position:static;
D. BHUVANESWARI

p{text align:italic;}

</style>

<body>

<h1>css</h1>

<h2>a simple program</h2>

<p> this is paragraph</p>

</body>

</html>

OUTPUT:
D. BHUVANESWARI

RESULT: The program is successfully completed hence the output is verified.

HTNO: 8 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM CREATING LIST

<HTML><HEAD>LIST</HEAD><BODY bgcolor=peech>

<OL>

<LI>APPLE

<LI>BANANA

<LI>GRAPHS

<LI>ORANGE

</OL>

<OL TYPE="I">

<LI>APPLE

<LI>BANANA

<LI>GRAPHS

<LI>ORANGE

</OL>

<OL START="54">

<LI>APPLE

<LI>BANANA

<LI>GRAPHS

<LI>ORANGE

</OL>

<UL>

<LI>POTATO

<LI>TOMATO

<LI.CARROT
D. BHUVANESWARI

<UL>

<UL START="DISC">

<LI>POTATO

<LI>TOMATO

<LI>CARROT

<OL>

<DT>DIR

<DD>DIR STANDS FOR DIRECTORY

<DT>COPY

<DD>COPY COMMAND IS USED TO MAKE A DUPLICATE COPY OF FILE

<DT>DELETE

<DD>DELETE COMMAND IS USED TO DELETE THE FILES

</OL>

</BODY>

</HTML>

OUTPUT:
D. BHUVANESWARI

RESULT: The program is successfully completed hence the output is verified.

HTNO: 9 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING MATH OBJECT

<html>

<head>

<title>math Object</title>

<script type="text/javascript">

function display(num)

alert(Math.sqrt(num));

</script>

</head>

<body bgcolor=pink>

<center>

<form name="form1">

<h3>Enter some value</h3>

<input type="text"name="text1">

<input type="button"name="button1"value="find square root"

onclick=display(form1.text1.value)>

</form>

</center>

</body>

</html>
D. BHUVANESWARI

OUTPUT:
D. BHUVANESWARI

RESULT: The program is successfully completed hence the output is verified.

HTNO: 10 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM BY USING STRING

<html>

<head>

<title>string operations</title>

</head>

<center><body bgcolor="orange">

<script type="text/javascript">

var s1="HELLO";

var s2="ksr";

document.write("First string is:"+s1+"<br>");

document.write("Second string is:"+s2+"<br>");

document.write("Concatenating two strings:"+s1.concat(s2)+"<br>");

document.write("Finding length of second string:"+s2.length+"<br>");

document.write("The character ot 0th positipn of first string is:"+s1.charAt(0)+"<br>");

document.write("The first string can be converted to lower case as:"+s1.toLowerCase());

</script>

</center>

</body>

</head>

</html>
D. BHUVANESWARI

OUTPUT:
D. BHUVANESWARI

RESULT: The program is successfully completed hence the output is verified.

HTNO: 11 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM TO CREATE A TABLE

<html>

<head>

<title>creat table studentdetails</title>

</head>

<body bgcolour="green">

<table border="2">

<tr>

<th>Student number

<th>Student name

<th>Student course

<th>Student address

<th>Student phno

</tr>

<tr>

<td>1

<td>R Mani

<td>bcom(ca)

<td>poduru

<td>6302139854

</tr>

<tr>
D. BHUVANESWARI

<td>2

<td>S Gayathri

<td>bcom(ca)

<td>santhipuram

<td>9856712569

</tr>

<tr>

<td>3

<td>R Ganesh

<td>bcom(ca)

<td>bendanakuppam

<td>7995353903

</tr>

<tr>

<td>4

<td>V Jyothi

<td>bcom(ca)

<td>rallabuduguru

<td>6312548956

</tr>

<tr>

<td>5

<td>U Purnima

<td>bcom(ca)

<td>vkota
D. BHUVANESWARI

<td>6325498751

</tr>

<tr>

<td>6

<td>V Jagannath

<td>bcom(ca)

<td>gadduru

<td>7675077024

</tr>

<tr>

<td>7

<td>R Brundha

<td>bcom(ca)

<td>mkpuram

<td>9587462185

</tr>

<tr>

<td>8

<td>G Punitha

<td>bcom(ca)

<td>kuppam

<td>9854671258

</tr>

<tr>

<td>9
D. BHUVANESWARI

<td>R Saritha

<td>bcom(ca)

<td>santhipuram

<td>9658427624

</tr>

<tr>

<td>10

<td>M Kousar begum

<td>bcom(ca)

<td>vkota

<td>6325497585

</tr>

<tr>

<td>11

<td>A Ramya

<td>bcom(ca)

<td>vijalapuram

<td>6325489712

</tr>

<tr>

<td>12

<td>R Mounika

<td>bcom(ca)

<td>kuppam

<td>9347584278
D. BHUVANESWARI

</tr>

<tr>

<td>13

<td>N Pavithra

<td>bcom(ca)

<td>tummisi

<td>6324589135

</tr>

<tr>

<td>14

<td>J Dhanasekhar

<td>bcom(ca)

<td>kondatimmanapalli

<td>6326535982

</tr>

<tr>

<td>15

<td>V Shobha

<td>bcom(ca)

<td>mkpuram

<td>9725486925

</tr>

<tr>

<td>16

<td>M Santhi
D. BHUVANESWARI

<td>bcom(ca)

<td>k krishnapuram

<td>6325489751

</tr>

<tr>

<td>17

<td>BR Kalpana

<td>bcom(ca)

<td>kuppam

<td>6325498757

</tr>

<tr>

<td>18

<td>N Prathap

<td>bcom(ca)

<td>mkpuram

<td>6325425252

</tr>

<tr>

<td>19

<td>TV Purushotham

<td>bcom(ca)

<td>thotakanuma

<td>6396935394

</tr>
D. BHUVANESWARI

<tr>

<td>20

<td>G Ajith

<td>bcom(ca)

<td>tummisi

<td>9347251525

</tr>

</body>

</html>

OUTPUT:

RESULT: The program is successfully completed hence the output is verified.


D. BHUVANESWARI

HTNO: 12 PAGE NO:

PROGRAM CODE:

DEVELOPING A HTML PROGRAM TO CREATE A VARIABLE

<html>

<head>

<title>variables in java script</title>

</head>

<center><body bgcolor="skyblue">

<script type="text/javascript">

var a,b,c;

var str;

a=2;

b=3;

c=a+b;

str="The Result=";

document.write("Performing addition of 2 and 3"+"<br>");

document.write(str);

document.write(c);

</script>

</center>

</body>

</head>

</html>
D. BHUVANESWARI

OUTPUT:

RESULT: The program is successfully completed hence the output is verified.

You might also like