Professional Documents
Culture Documents
<html>
<head>
<title> Header tags</title>
</head>
<body>
<h1> web technologies</h1>
<h2> web technologies</h2>
<h3>web technologies</h3>
<h4>web technologies</h4>
<h5>web technologies</h5>
<h6>web technologies</h6>
</body>
</html>
Output:
2.Write a html program with Paragraph Tag,Line Break Tag,Centering
content,Horizontal Lines,Preserve Formatting.
<html>
<head>
<title>Example of tags</title>
</head>
<body>
<center>
</center>
<p>Hello<br />
<br />
Thanks<br />
</p>
<pre>
1 Pratap Employee
2 Akshay Student
</pre>
</body>
</html>
Output:
3.Write a html formatting program using Bold Text,Italic Text,Underlined Text and
Strike Text.
<html>
<head>
</body>
</html>
Output:
WEEK-2
1.Write a html program to format the text to Superscrpit, Subscript and Inserted
Text.
<html>
<head>
<body bgcolor="red">
</body>
</html>
Output:
3. Write a html program using HTML Comments single line and Multiline.
<html>
<!--
</body>
</html>
Output:
4.Write a html program for displaying HTML Images.
<html>
<body>
</body>
</html>
Output:
WEEK- 3
<html>
<body bgcolor="green">
<tr>
<th>tic</th>
<th>tac</th>
<th>toe</th>
</tr>
<tr>
<th>x</th>
<th>y</th>
<th>z</th>
</tr>
<tr>
<th>y</th>
<th>x</th>
<th>z</th>
</tr>
<tr>
<th>z</th>
<th>x</th>
<th>y</th>
</tr>
</table>
</body>
</html>
Output:
2. Write a html program on tables with Rowspan Attribute.
<html>
<body bgcolor="orange">
<tr>
</tr>
<tr>
<td>x</td>
<td>y</td>
<td>z</td>
</tr>
<tr>
<td>y</td>
<td>z</td>
<td>x</td>
</tr>
<tr>
<td>z</td>
<td>x</td>
<td>y</td>
</tr>
</table>
</body>
</html>
Output:
4. . Write a html program on tables with Colspan Attribute.
<html>
<body bgcolor="orange">
<tr>
</tr>
<tr>
<td>x</td>
<td>y</td>
<td>z</td>
</tr>
<tr>
<td>y</td>
<td>z</td>
<td>x</td>
</tr>
<tr>
<td>z</td>
<td>x</td>
<td>y</td>
</tr>
</table>
</body>
</html>
Output:
3.Write a html program to display Unordered List
<html>
<h1>HERO HONDA</h1>
<ul style="list-style-type:disc">
<li>KARIZMA</li>
<li>CBZ</li>
<li>SPLENDER</li>
<li>GLAMOUR</li>
<li>HUNK</li>
<li>PASSION</li>
<li>DISCOVERY</li>
<li>CD110</li>
<li>ACTIVA</li>
<li>SHINE</li>
<li>DIO</li>
</ul>
</body>
</html>
Output:
4. Write a html program to display ordered List
<html>
<center>
<h1>MOBILE PHONES</h1>
</center>
<ul>
<ol style="list-style-type:disc">
<li><h3>SONY ERICSSON</h3></li>
</ul>
<ol type="I">
<ul>
<li><h3>NOKIA</h3></li>
</ul>
<ol type="I">
<li>NOKIA E63</li>
<li><h3>SAMSUNG</h3></li>
</ul>
<ol type="I">
</ol></body>
</html>
Output:
WEEK- 4
1.Write a html program to use Hyperlinks using Text and establish link to a page
Section in same Page
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body>
</body>
</html>
Output:
2.Write a html program for setting Link Colors
<html>
<head>
<title>Hyperlink Example</title>
</head>
</body>
</html>
Output:
3.Write a html program to use Image as Links.
<html>
<head>
<title>Hyperlink Example</title>
</head>
<body bgcolor="skyblue">
width="100"></a>
</body>
</html>
Output:
4.Write a html program to display HTML Marquees.
<html>
<head>
<body bgcolor="black">
</body>
</html>
Output:
WEEK- 5
<html>
<head>
<frameset rows="200,200">
<frameset cols="40%,60%">
<frame src="unordered.html">
<frame src="ordered.html">
</frameset>
<frame src="font.html"></frameset>
</html>
Output:
2.Write a html program using the Font tag.
<html>
<body>
</body>
</html>
Output:
WEEK -6
1.Write a html program on Form Controls for Creating a user registration form
containing all the form.
<html>
<head>
<title>STUDENT REGISTRATIONFORM</title>
</head>
<body>
<center><h1>REGISTRATION FORM</h1>
<form>
<table>
<tr>
<td>FIRST NAME</td>
<td><input type="text"/></td>
</tr><br/>
<tr>
<td>LAST NAME</td>
<td><input type="text"/></td>
</tr><br/>
<tr>
<td>GENDER</td>
</tr>
<tr>
<td><input type="text"/></td>
</tr>
<br/>
<tr>
<td>BRANCH</td>
<td><select name="branch">
<option>CSE</option>
<option>IT</option>
<option>ECE</option>
<option>EEE</option>
<option>MECH</option>
<option>CIVIL</option>
</td>
</tr>
<tr>
<td></select>
<td>HOBBIES</td>
<td>
</td>
</tr>
</br>
<tr>
<td>GOAL</td>
</tr>
<tr>
</tr>
</table>
</form>
</center>
</body>
</html>
Output:
WEEK- 7
Style.css
body
background-color:pink;
h1
color:red;
font-size:30
color:grey;
font-style:italic
a:visited{color:green}
a:hover{color:yellow}
External style sheet:
<html>
<head>
</head>
<body>
<p>paragraph text</p>
</body>
</html>
Output:
Internal Style sheet:
<html>
<head>
<style type="text/css">
body
background-color:pink;}
h1{font-size:36p;color:red;}
p{font-style:italic;color:grey:}
a:visited{color:green;}
a:active{color:blue;}
a:hover{color:yellow;}
</style>
<body>
<center>
<h1>HELLO</h1>
</center>
</body>
</html>
Output:
Inline Style Sheet:
<html>
<body bgcolor="green">
<h1 style="color:pink">Archana</h1>
<h1 style="font-style:italic;color:red">Anitha</h1>
</body>
</html>
Output:
WEEK-8
<html>
<head>
</head>
<body>
<p>layer 1</p>
</layer>
bgcolor="green">
<p>layer 2</p>
</layer>
height="200" bgcolor="green">
<p>layer 3</p>
</layer>
</body>
</html>
Output:
WEEK-9
<html>
<head>
<title>javascript example</title>
<script type="text/javascript">
document.write("hello world")
</script>
</head>
</html>
Output:
2.Write a Javascript using function and display alert message.
<html>
<head>
<script type="text/javascript">
window.alert("Hello world");
</script>
</head>
<body>WELCOME TO JAVASCRIPT</body>
</html>
Output:
WEEK-10
1.Write a javascript to read two values using prompt and display sum of two
numbers.
<html>
<script type="text/javascript">
var a1,a2,b1,b2,sum;
b1=parseInt(a1);
b2=parseInt(a2);
sum=b1+b2;
document.writeln("sum="+sum);
</script>
</html>
Output:
2.Write a javaScript to display factorial of a number.
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<script type="text/javascript">
var a1,b1;
b1=parseInt(a1);
b1 = i*b1;
document.write(b1);
</script>
</body>
</html>
Output:
WEEK-11
<html>
<head>
</head>
<body>
<script language="Javascript">
a=new Array(20,30,10,50,40,70,60);
n=a.length;
for(var i=0;i<n;i++)
document.writeln(a[i]+"   ");
i=0;
i++;
}
if(i<n)
else
</script>
</body>
</html>
output:
2.Write a javascript for sorting and array of elements.
<html>
<head>
</head>
<body>
<script language="Javascript">
a=new Array(20,50,40,10,30,40,70,15);
for(var i=0;i<a.length;i++)
document.writeln(a[i]+"   ");
document.writeln("<br> <br>");
document.writeln("<br> <br>");
document.write("<br>"+ a.toString());
</script>
</body>
</html>
output:
WEEK-12
<html>
<head>
<title>Array Addition</title>
<script language="javascript">
var a,n,i,j,b,c;
a=[[],[]];
b=[[],[]];
c=[[],[]];
for (i=0;i<n;i++)
for (j=0;j<n;j++)
for (i=0;i<n;i++)
for (j=0;j<n;j++)
{
for (i=0;i<n;i++)
for (j=0;j<n;j++)
document.writeln(a[i][j]);
for (i=0;i<n;i++)
for (j=0;j<n;j++)
document.writeln(b[i][j]);
for (i=0;i<n;i++)
for (j=0;j<n;j++)
{
c[i][j]=a[i][j]+b[i][j];
for (i=0;i<n;i++)
for (j=0;j<n;j++)
document.writeln(c[i][j]);
</script>
</head>
</html>
output:
WEEK-13
Wirte javascript to validate the following fields of the above registration page
a. Name(Name should contains alphabets and the length should not be less than 6
character).
c. E-mail_id(should not contain any invalid and must follow the standard pattern
name@domain.com)
<html>
<title>Validation</title>
<head>
<script language="javascript">
var aa=0;
function verify()
if(name()&&password()&&email()&&phone())
alert("Validation Successfull")
function name()
var name=f1.n.value
if(name.length<6)
return true
function password()
var password=f1.p.value
if(password.length<6)
else
return true
function email()
var email=f1.em.value
if(email.indexOf("@")<0)
else
return true
function phone()
var phone=f1.pn.value
if(phone.length<10)
alert("Enter 10 digits")
else
return true
</script>
</head>
<body>
</form>
</body>
</html>
output:
catalog.dtd
catalog
font-family:arial;
font-size:16pt;
book
disply:block;
font-size:13pt;
title
font-family:arial;
color:maroon;
font-size:12pt;
author
font-family:arial;
}
publication,edition,isbn,price
disply:block;
font-family:arial;
color:black;
font-size:10pt;
margin-left:20pt;
}
catalog.xml
<catalog>
<book>
<title>xml</title>
<author>witson</author>
<publication>willy</publication>
<edition>5</edition>
<isbn>1234</isbn>
<price>200</price>
</book>
<book>
<title>xAI</title>
<author>russel</author>
<publication>prinston</publication>
<edition>6</edition>
<isbn>2345</isbn>
<price>300</price>
</book>
<book>
<title>java2</title>
<author>waston</author>
<publication>bpb</publication>
<edition>3</edition>
<isbn>3456</isbn>
<price>400</price>
</book>
<book>
<title>html</title>
<author>bates</author>
<publication>sam</publication>
<edition>4</edition>
<isbn>4567</isbn>
<price>500</price>
</book>
</catalog>
catalog.html
<?xml version="1.0"?>
<xsl:template match="/">
<html>
<body>
<center>
<h1>book information</h1>
<table border="1">
<tr bgcolor="gray">
<th>title</th>
<th>author</th>
<th>publication</th>
<th>edition</th>
<th>isbn</th>
<th>price</th>
</tr>
<xsl:for-each select="catalog/book">
<tr>
<td><xsl:value-of select="title"/></td>
'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
</b></td>
<td><xsl:value-of select="publication"/></td>
<td><xsl:value-of select="edition"/></td>
<td><xsl:value-of select="isbn"/></td>
<td><xsl:value-of select="price"/></td>
</tr>
</xsl:for-each>
</table>
</center>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
output: