Professional Documents
Culture Documents
Ashutosh
Ashutosh
Laboratory
fileOn
Web design (BCS-353)
Submitted for Bachelor
of technologyIn
Computer science
BATCH 2022-2026
Submitted to: submitted by:
1 Design the following static web pages required for an online book store 1-8
web site.
1) HOME PAGE: The static home page must contain three frames.
2) LOGIN PAGE
3) CATOLOGUE PAGE: The catalogue page should contain the
details of all the books available in the web site in a table.
4) REGISTRATION PAGE
3 Develop and demonstrate the usage of inline, internal and external 15-17
style sheet using CSS
Develop and demonstrate PHP Script for the following problems: 25-26
7 a) Write a PHP Script to find out the Sum of the Individual Digits.
b) Write a PHP Script to check whether the given number is
Palindrome or not
1) HOME PAGE:
Top frame: Logo and the college name and links to Home page, Login page, Registration
page, Catalogue page and Cart page (the description of these pages will be given below).
Left frame: At least four links for navigation, which will display the catalogue of respective
links . For e.g.: When you click the link “IT” the catalogue for IT Books should be displayed in
the Right frame.
Right frame: The pages to the links in the left frame must be loaded
home.html:
<html>
</frameset>
logo.html <html>
<body>
</body>
</html> title.html
<html>
<body>
<center<i> ONLINE BOOK SHOP </i> </font></center>
</body>
</html>
branches.html
<html>
<table cellspacing=15>
</table>
</body>
</html>
<body>
<table width="100%">
<tr>
</tr>
</table>
</body> </html>
homedes.html
<html>
<body>
login.html
<html>
</head>
<body>
><br>
</center> </form>
</body></html>
Output: login page(we will get this output when you click on login in home page)
ASSIGNMENT-3
OBJECTIVE: To design a CATOLOGUE PAGE. The catalogue page should contain the details of all
the books available in the website in a table.
catalogue.html
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function fun()
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
ActiveXObject("Microsoft.XMLDOM");
xmldoc.load("book.xml");
arr=xmldoc.getElementsByTagName("ITEM");
for(i=0;i<arr.length;i++)
document.write("<div
align='center'><b>NAME:</b>"+xmldoc.getElementsByTagName("NAME")[i].childNodes[0].nodeValu
e+"<BR></div>");
document.write("<div
align='center'><b>AUTHOR:</b>"+xmldoc.getElementsByTagName("AUTHOR")[i].childNodes[0].nod
eValue+"<BR></div>");
document.write("<div
align='center'><b>PRICE:</b>"+xmldoc.getElementsByTagName("PRICE")[i].childNodes[0].nodeValu
e+"<BR></div>");
document.write("<div
align='center'><b>PUBLISHER:</b>"+xmldoc.getElementsByTagName("PUBLISHER")[i].childNodes[
0].nodeValue+"<BR></div>");
document.write("<div
align='center'><b>ISBN:</b>"+xmldoc.getElementsByTagName("ISBN")[i].childNodes[0].nodeValue+"
<BR></div>");
</SCRIPT>
</BODY></HTML>
book.xml
<?xml version="1.0"?>
<BOOK>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
<ITEM>
</ITEM>
</BOOK>
Output: Catalogue page
csechecktest.html
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function fun()
}
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
ActiveXObject("Microsoft.XMLDOM");
xmldoc.load("csebook.xml");
arr=xmldoc.getElementsByTagName("ITEM");
for(i=0;i<arr.length;i++)
document.write("<div align='center'><b>NAME:</b>"+xmldoc.getElementsByTagName("NAME")
[i].childNodes[0].nodeValu e+"<BR></div>");
document.write("<div align='center'><b>AUTHOR:</b>"+xmldoc.getElementsByTagName("AUTHOR")
[i].childNodes[0].nod eValue+"<BR></div>");
document.write("<div align='center'><b>PRICE:</b>"+xmldoc.getElementsByTagName("PRICE")
[i].childNodes[0].nodeValu e+"<BR></div>");
document.write("<div
align='center'><b>PUBLISHER:</b>"+xmldoc.getElementsByTagName("PUBLISHER")[i].childNodes[
0].nodeValue+"<BR></div>");
document.write("<div align='center'><b>ISBN:</b>"+xmldoc.getElementsByTagName("ISBN")
[i].childNodes[0].nodeValue+"
<BR></div>"); document.write("<div align='right'><input type='button' value='Add To Cart'
onclick='fun()'</div>"); document.write("<BR>");
</SCRIPT></BODY></HTML>
casebook.xml
<?xml version="1.0"?>
<CSEBOOK>
<ITEM>
</ITEM>
<ITEM>
OBJECTIVE : To design a CART PAGE that contains the details about the books which
are added to the cart.
Program for creating a CART page contains the details about the books which are added to
the cart.The cart page contains the fields: Book, name, Price, Quantity and Amount cart.html
<html>
<body >
<tr>
<td>Book name</td>
<td>price</td>
<td>quantity</td>
<td>amount</td>
</tr>
<tr>
<td>java2</td>
<td>$35.5</td>
<td>2</td>
<td>$70</td>
</tr>
<tr>
<td>XML bible</td>
<td>$40.5</td>
<td>1</td>
<td>$40.5</td>
</tr> <tr>
<td></td>
<td></td>
<td>130.5 </td>
</tr>
</body>
</html>
Output:
Program for creating DTD for the XML file(dtd.xml
<!DOCTYPE BOOKS[
]>
<BOOKS>
<INFORMATION>
<Book>
<book_name>XML BIBLE</book_name>
<Author_name>RAJA</Author_name>
<ISBN_number>11530-115</ISBN_number>
<publisher>Pearson</publisher>
<Edition>I-Edition</Edition>
<Price>750</Price>
</Book>
<Book>
<book_name>HTML</book_name>
<Author_name>DIETL</Author_name>
<ISBN_number>11528-115</ISBN_number>
<publisher>wiley</publisher>
<Edition>III-Edition</Edition>
<Price>470</Price>
</Book>
<Book>
<book_name>JAVASCRIPT</book_name>
<Author_name>RANI</Author_name>
<ISBN_number>11525-115</ISBN_number>
<publisher>Techical</publisher> <Edition>IV-Edition</Edition>
<Price>270</Price>
</Book>
<Book>
<book_name>WEB TECHNOLOGIES</book_name>
<Author_name>PUNTAMBEKAR</Author_name>
<ISBN_number>11530-115</ISBN_number>
<publisher>Technical</publisher>
<Edition>I-Edition</Edition>
<Price>340</Price>
</Book>
</INFORMATION>
</BOOKS>
Style.xsl
<xsl:template match="/">
<html>
<body>
<tr bgcolor="GRAY">
</tr>
<xsl:for-each select="BOOKS/INFORMATION/Book">
<tr>
<td><xsl:value-of select="book_name"/></td>
<xsl:value-of select="Author_name"/></font></b></td>
<td><xsl:value-of select="ISBN_number"/></td>
<td><xsl:value-of select="publisher"/></td>
<td><xsl:value-of select="Edition"/></td>
<td><xsl:value-of select="Price"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Output:
ASSIGNMENT -5
OBJECTIVE : Create a“ Registration form“ having various fields.
HTML code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1><B><U>REGISTRATION FORM</U></B></h1>
<label for="username">Username:</label>
<label for="pwd">Password:</label>
<label for="ma">Male</label>
<label for="fe">Female</label>
<label for="ot">Others</label><br>
<br>
<label for="TEL">Telegu</label><br>
</form>
</body>
</html>
CSS code:
H1{
text-align: center;
font-size: 50PX;
}
.register{
text-align: center;
height: 300px;
font-size: 30px;
text-decoration: underline;
line-height: 2;
word-spacing: 5px;
}
input[type=text] {
width: 50%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid blue;
border-radius: 4px;
}
input[type=password] {
width: 50%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid blue;
border-radius: 4px;
}
input[type=date] {
width: 50%;
padding: 12px 20px;
margin: 8px 0;
box-sizing: border-box;
border: 2px solid blue;
border-radius: 4px;
}
Output-
REGISTRATION FORM:
ASSIGNMENT -6
OBJECTIVE: Write JavaScript to validate the “name” and “password” fields of the registration page.
Program in JavaScript to validate the following fields of the above registration page.
1. Name (Name should contains alphabets and the length should not be less than
6 characters).
Program for validating the username (Name should contains alphabets and the
length should not be less than 6 characters).
1)NAME VALIDATION
<html>
<head>
<title>validating a textbox</title>
<script language="javascript">
function button_click()
%^&*()+=-[]\\\';,./{}|\":<>?~"; var
number="0123456789"; if(fname.length<6)
i=0;i<fname.length;i++)
{ if(spchar.indexOf(fname.charAt(i)) != -
1)
special characters");
f.fname.value=" "; return
false;
} } if(fname!="") { for
(var i=0;i<fname.length;i+
+)
{ if(number.indexOf(fname.charAt(i)) != -
1)
have numbers");
f.fname.value=""; return
false;
}}
if(fname.length>=6)
alert("valid
username");
</script>
<body>
<center>
<form name="f">
<table>
<tr>
<td align="right">USERNAME:</td>
<br>
<tr>
<td></td>
</form>
</table>
</center>
</body>
</html>
OUTPUT:
Program for password field validation(should not be less than 6
characters) (pwdvalid.html)
<html>
<head>
<title>PASSWORD VALIDATION</title>
pass()
{ var pw=f.pw.value;
var cpw=f.cpw.value;
if(pw.length<6)
} if(pw!=cpw)
} else
if(pw.length>=6)
</script>
</head>
<body>
<form name="f">
<table align="center">
<br>
<tr>
<td align="right">PassWord:</td>
</tr>
<tr>
</tr>
<tr>
<td></td>
</tr>
Output:
ASSIGNMENT -7
OBJECTIVE: Write JavaScript to validate the “Email ID ” and “Phone Number” fields of the
registration page.
Program for E-mail id validation(should not contain any invalid and must follow the
standard pattern-)(emailvalid.html)
<html>
<head>
<title>EMAIL ID VALIDATION</title>
check()
{ if(f.txtname.value.indexOf('@')==-1)
{ alert("invalid");
else if((f.txtname.value.indexOf('@')==0)||(f.txtname.value.indexOf('.')==0)||
(f.txtname.value.indexOf('@'))>
(f.txtname.value.indexOf('.')))
{ alert("invalid email
id");
f.txtname.value=""; }
id");
</script>
</head>
<body>
<form name="f">
<table align="center">
<h2 align="center">EMAIL VALIDATION</h2>
<br>
<tr>
<td align="right">Email-ID:</td>
</tr>
<tr>
<td></td>
</tr>
</table>
</form>
</body>
</html>
Output:
Program for Phone number validation(Phone number should contain 10
digits only)(phnvalid.html)
<html>
<head>
phno()
{ var
ph=f.ph.value;
if(ph.length==10)
number");
</script>
</head>
<body>
<form name="f">
<table align="center">
<br><br><br><br>
<br>
<tr>
<tr>
<td></td>
</tr>
Output:
ASSIGNMENT -8
OBJECTIVE: Design a web page using CSS(Cascading Style Sheets) which includes Use of different
font, styles and background image.
In the style definition you define how each selector should work (font, color
etc.). Then, in the body of your pages, you refer to these selectors to activate the
1) Inline.html
<head>
style
</body>
</html>
Output:
2. Set a background image for both the page and single elements on the page.
<html>
<head>
</style>
</head>
<body>
<center>
<font color=fuchsia>
<h1>WebTechnologies</h1>
</center>
</body>
</html>
Output:
ASSIGNMENT -9
OBJECTIVE: Using CSS Control the repetition of the image with the background-repeat property and
define styles for links.
Tiles the image until the entire page is filled, just like an ordinary background image
in plain HTML.
<head>
</style>
</head>
<body>
<center>
<font color=fuchsia>
<h1>satish</h1>
</font>
</center>
</body>
</html>
Output:
A:active
A:hover
<html>
<head>
</head>
<body bgcolor="black">
<font color=white >normal bold : <b>Web technologies</b><br>after applied embedded style :
<b>
<br>
</b>
</font>
</body>
</html>
style.css
.xlink {cursor:crosshair;color:cyan}
.hlink{cursor:help;color:purple}
*/
Output: