Practical 1: Aim: Design A Webpage Using Different Text Formatting Tags. Code
Practical 1: Aim: Design A Webpage Using Different Text Formatting Tags. Code
Practical 1
Aim: Design a Webpage Using different Text Formatting Tags.
Code:<html>
<head>
</head>
<body<h3>
</h3>
</body>
WEB_TECHNOLOGY
SYBCA
</html>
Output:
WEB_TECHNOLOGY
SYBCA
Practical 2
Aim: Design a Webpage with different types of Marquee Tags.
Code: <html>
<body><marquee>
<h1>Patkar - Vardecollege</h1>
</marquee><br>
</marquee><br>
<marquee direction="down">
</marquee>
</marquee>
</marquee>
<marquee direction="up">
</marquee>
</body>
</html>
WEB_TECHNOLOGY
SYBCA
Output:
WEB_TECHNOLOGY
SYBCA
Practical 3
Aim: Design a Webpage with links to different pages and allow navigation
between pages.
Code: prac3_1.html-
<html>
<body background="jio.jpg">
<h2><center>
<ul>
<li>Jio provides 4G LTE services and is the only VoLTE (Voice over LTE)
service provider in India. </li>
</h5></font></ul>
</body>
</html>
prac3_2.html : <html>
<body background="airtel.png">
<h2><center>
WEB_TECHNOLOGY
SYBCA
<ul>
<li> It operates in 18 countries across South Asia and Africa, and also in the
Channel Islands.</li>
<li>Airtel provides GSM, 3G, 4G LTE, 4G+ mobile services, fixed line
broadband and voice services depending upon the country of operation.</li>
</h5></font></ul>
</body>
</html>
prac3_3.html : <html>
<body background="idea.jpg">
<h2><center>
<ul>
<li>In line with the Government’s vision of Digital India, Idea has accelerated
its efforts of building a digital economy. </li>
WEB_TECHNOLOGY
SYBCA
<li>Idea has also set up a fibre network of over 1.50 lakh kms. </li>
</h5></font></ul>
</body>
</html>Output:
WEB_TECHNOLOGY
SYBCA
Practical 4
Aim: Design a Webpage with Image and Image maps.
Code: <html>
<body>
<map name="test">
</map>
</body>
</html>
Output:
WEB_TECHNOLOGY
SYBCA
Practical 5
Aim:Design a Webpage Create a student table with the following fields.
Student Id, Name, DOB, Course, Address, E-mail id and apply Embedded
cascading style sheet CSS with the following attributes: Font size, color,
style, bold, italic, border color, set the background image & set the center
align of table & text.
Code :<html>
<head>
<title> Table</title>
<style type="text/css">
Td {
text-align:center;
color:bold;
font-style:bold;
font size:20px;
Table {
color:blue;
bordercolor:blue;
background-image: url("Tulips.jpg");
height:500px;
width:700px;
Th {
font-size:25px;
color:purple;
WEB_TECHNOLOGY
SYBCA
</style>
</head>
<body>
<center>
<b>
<i>
<tr>
<th>Student Id</th>
<th>Name</th>
<th>DOB</th>
<th>Course</th>
<th>Address</th>
<th>E-Mail Id</th>
</tr>
<tr>
<td>1</td>
<td>viraj</td>
<td>14/3/99</td>
<td>BCA</td>
<td>malad</td>
<td>[email protected]</td>
</tr>
<tr>
WEB_TECHNOLOGY
SYBCA
<td>2</td>
<td>dilip</td>
<td>16/09/98</td>
<td>BCA</td>
<td>goregon</td>
<td>[email protected]</td>
</tr>
<tr>
<td>3</td>
<td>shailesh</td>
<td>09/02/98</td>
<td>BCA</td>
<td>andheri</td>
<td>[email protected]</td>
</tr>
<tr>
<td>4</td>
<td>vishu</td>
<td>25/12/95</td>
<td>BCA</td>
<td>malad</td>
<td>[email protected]</td>
</tr>
<tr>
<td>5</td>
WEB_TECHNOLOGY
SYBCA
<td>akshay</td>
<td>14/10/98</td>
<td>BSC</td>
<td>Andheri</td>
<td>[email protected]</td>
</tr></table>
</b></i>
</center>
</body>
</html>
Output:
WEB_TECHNOLOGY
SYBCA
Practical 6
Aim:Design a Webpage Create an External CSS for above and apply to the
webpage.
Code:
prac6.css:
Td
text-align:center;
color:bold;
font-style:bold;
font size:20px;
Table
color:blue;
bordercolor:red;
background-image: url("Tulips.jpg");
height:500px;
width:700px;
Th
font-size:25px;
color:purple;
WEB_TECHNOLOGY
SYBCA
prac6.html :
<html>
<head>
<title> Table</title>
</head>
<body>
<center>
<b>
<i>
<tr>
<th>Student Id</th>
<th>Name</th>
<th>DOB</th>
<th>Course</th>
<th>Address</th>
<th>E-Mail Id</th>
</tr>
<tr>
<td>1</td>
<td>viraj</td>
<td>14/3/99</td>
WEB_TECHNOLOGY
SYBCA
<td>BCA</td>
<td>malad</td>
<td>[email protected]</td>
</tr>
<tr>
<td>2</td>
<td>dilip</td>
<td>16/09/98</td>
<td>BCA</td>
<td>goregon</td>
<td>[email protected]</td>
</tr>
<tr>
<td>3</td>
<td>shailesh</td>
<td>09/02/98</td>
<td>BCA</td>
<td>andheri</td>
<td>[email protected]</td>
</tr>
<tr>
<td>4</td>
<td>vishu</td>
<td>25/12/95</td>
<td>BCA</td>
WEB_TECHNOLOGY
SYBCA
<td>malad</td>
<td>[email protected]</td>
</tr>
<tr>
<td>5</td>
<td>akshay</td>
<td>14/10/98</td>
<td>BSC</td>
<td>Andheri</td>
<td>[email protected]</td>
</tr></table>
</b></i>
</center>
</body>
</html>
Output:
WEB_TECHNOLOGY
SYBCA
Practical 7
Aim:Design a Webpage Create a Frameset that divides browser window into
Horizontal and Vertical frameset.
Code: <html>
<frameset rows="35%,20%,*">
<frameset cols="50%,*">
<frame name=1>
<frame name=2>
</frameset>
<frame name=3>
<frameset cols="30%,40%,*">
<frame name="4">
<frameset rows="50%,*">
<frame name=5>
<frame name=6>
</frameset>
<frame name="7">
</frameset>
</frameset>
</html>
WEB_TECHNOLOGY
SYBCA
Output:
WEB_TECHNOLOGY
SYBCA
Practical 8
Aim:Design a Webpage Write the JavaScript Code to enter five numbers in the
Prompt box. Calculate addition of numbers and average.
Code: <html>
<script language="javascript">
var U,V,W,X,Y;
var i=U+V+W+X+Y;
document.write("<br>");
var j=i/500*100;
document.write("<br>");
</script>
</html>
WEB_TECHNOLOGY
SYBCA
Output:
WEB_TECHNOLOGY
SYBCA
Practical 9
Aim:Design a Webpage with image and text apply javascript mouse event –
onmouseover, onmouseout, onmouseclick on image & text.
Code: <html>
<body>
</body>
</html>
Output:
WEB_TECHNOLOGY
SYBCA
Practical 10
Aim:Design a Webpage which displays the javascript popupboxes:
1. Alert.
2. Confirm.
3. Prompt.
<html>
<body>
<h2>Javascript Alert</h2>
<script>
function myFunction() {
</script>
</body></html>
Output:
WEB_TECHNOLOGY
SYBCA
<html>
<body>
<h2>Javascript confirm Box </h2>
<button onclick=" myFunction()" > Try it </button>
<p id="demo"></p>
<script>
functionmyFunction()
{
var txt;
if (confirm ("press a button")==true)
{
txt="You pressed ok !";
}
Else
{
txt="You pressed cancel !";
}
document.getElementById("demo").innerHTML=txt;
}
</script>
</body>
</html>
WEB_TECHNOLOGY
SYBCA
Output:
2. Prompt: (Code:)
<html>
<body>
<h2>Javascript Prompt Box </h2>
<button onclick=" myFunction()" > Try it </button>
<p id="demo"></p>
<script>
functionmyFunction()
{
var txt;
var person =prompt("Please enter your name:", "viraj");
if (person == null || person ==" ")
{
txt="User cancelled the prompt !";
}
else
{
txt="Hello "+ person + "! How are you today?";
}
document.getElementById("demo").innerHTML=txt;
}
</script>
</body>
WEB_TECHNOLOGY
SYBCA
</html>
Output:
Practical 11
Aim:Design a Webpage Create a Form and validate all the control placed on the
form using javascript.
Code: <html>
<head>
<title>Form Validation</title>
<script type="text/javascript">
<!--
function validate()
if(document.myForm.Name.value == "" )
document.myForm.Name.focus() ;
WEB_TECHNOLOGY
SYBCA
return false;
if(document.myForm.EMail.value == "" )
document.myForm.EMail.focus() ;
return false;
if(document.myForm.Zip.value == "" ||
isNaN(document.myForm.Zip.value ) ||
document.myForm.Zip.value.length != 6 )
document.myForm.Zip.focus() ;
return false;
if(document.myForm.Country.value == "-1" )
return false;
varemailID = document.myForm.EMail.value;
atpos = emailID.indexOf("@");
dotpos = emailID.lastIndexOf(".");
WEB_TECHNOLOGY
SYBCA
document.myForm.EMail.focus() ;
return false;
return( true );
//-->
</script>
</head>
<body>
<form action="https://www.google.co.in/?gfe_rd=cr&ei=3OWiWO-
zFdP08wfO_qnwAg" name="myForm" onsubmit="return(validate());">
<tr>
<tdalign="right">Name</td>
</tr>
<tr>
<td align="right">EMail</td>
WEB_TECHNOLOGY
SYBCA
</tr>
<tr>
</tr>
<tr>
<td align="right">Country</td>
<td>
<select name="Country">
<option value="1">USA</option>
<option value="2">UK</option>
<option value="3">INDIA</option>
</select>
</td>
</tr>
<tr>
<td align="right"></td>
</tr>
</table>
</form>
</body>
</iframe>
WEB_TECHNOLOGY
SYBCA
Output:
Practical 12
Aim:Design a DTD, corresponding XML document and display it on using
CSS.
Code:
Order.dtd :
<!ELEMENTtel_no (#PCDATA)>
WEB_TECHNOLOGY
SYBCA
<!ELEMENTname_p (#PCDATA)>
Order1.xml :
<order>
<customer>
<name>Patkar</name>
<address>Goregaon</address>
<contact>
<email>[email protected]</email>
<tel_no>1111111111</tel_no>
</contact>
</customer>
<product>
<name>Pen Drive</name>
<price>100</price>
<quantity>40</quantity>
</product>
</order>
Order.css:
th
background-color:pink;
WEB_TECHNOLOGY
SYBCA
td
background-color:yellow;
text-align:center;
font-weight:bold;
font-style:italic;
color:blue;
h2
color:red;
Order.xsl :
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
</head>
<body>
WEB_TECHNOLOGY
SYBCA
<caption><h2>ORDER DETAILS</h2></caption>
<tr>
<th>Customer name:</th>
<td><xsl:value-of select="order/customer/name"/></td>
</tr>
<tr>
<th>Address:</th>
<td><xsl:value-of select="order/customer/address"/></td>
</tr>
<tr>
<th>Contact:</th>
<td><xsl:value-of select="order/customer/contact"/></td>
</tr>
<tr>
<th>Product name:</th>
<td><xsl:value-of select="order/product/name"/></td>
</tr>
<tr>
<th>Price:</th>
<td><xsl:value-of select="order/product/price"/></td>
</tr>
<tr>
<th>Quantity:</th>
<td><xsl:value-of select="order/product/quantity"/></td>
</tr>
WEB_TECHNOLOGY
SYBCA
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output:
Practical 13
Aim:Design an XML file document and display it in browser using XSL.
Code:
Order1.xml :
<order>
<customer>
<name>Patkar</name>
<address>Goregaon</address>
<contact>
<email>[email protected]</email>
<tel_no>1111111111</tel_no>
</contact>
WEB_TECHNOLOGY
SYBCA
</customer>
<product>
<name>Pen Drive</name>
<price>100</price>
<quantity>40</quantity>
</product>
</order>
Order.xsl :
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
</head>
<body>
<caption><h2>ORDER DETAILS</h2></caption>
<tr>
<th>Customer name:</th>
<td><xsl:value-of select="order/customer/name"/></td>
</tr>
<tr>
<th>Address:</th>
WEB_TECHNOLOGY
SYBCA
<td><xsl:value-of select="order/customer/address"/></td>
</tr>
<tr>
<th>Contact:</th>
<td><xsl:value-of select="order/customer/contact"/></td>
</tr>
<tr>
<th>Product name:</th>
<td><xsl:value-of select="order/product/name"/></td>
</tr>
<tr>
<th>Price:</th>
<td><xsl:value-of select="order/product/price"/></td>
</tr>
<tr>
<th>Quantity:</th>
<td><xsl:value-of select="order/product/quantity"/></td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output:
WEB_TECHNOLOGY
SYBCA
Practical 14
Aim:Design XML Schema and corresponding XML document.
Code:
Order.xml:
<shiporderorderid="889923"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="shiporder.xsd">
<orderperson>John Smith</orderperson>
<shipto>
<name>Ola Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
WEB_TECHNOLOGY
SYBCA
<country>Norway</country>
</shipto>
<item>
<title>Empire Burlesque</title>
<note>Special Edition</note>
<quantity>1</quantity>
<price>10.90</price>
</item>
<item>
<quantity>1</quantity>
<price>9.90</price>
</item>
</shiporder>
shiporder.xsd:
<xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shiporder">
<xs:complexType>
<xs:sequence>
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
WEB_TECHNOLOGY
SYBCA
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType>
<xs:sequence>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Output:
WEB_TECHNOLOGY
SYBCA
WEB_TECHNOLOGY