These programs are useful for the students studying WEB TECHNOLOGY in B.Tech(C.S.) 3rd year.
You can find some basic programs of HTML CSS and JavaScript here.
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Learn JavaScript HTML & CSS
1. Page | 1
PROGRAM: 1
AIM: Program to perform all tags in HTML.
ALGORITHM:
1. Create <html> tag
2. Create <head> tag
3. Add Title using <title> tag & enclose it with </title> tag.
4. Define <body> tag to determine the main content of HTML doc.
5. Define a <p> paragraph tag to add a paragraph in HTML doc,
6. Enclose it with closing </p> tag.
7. Define <h1> tag to create Headings in HTML doc,
8. And enclose it with closing </h1> tag.
9. Define <img src=”ImageUrl.jpg”/> to add images in HTML doc,
10. Define <a href=”Link”> to add a link on text or image in HTML doc,
11. Enclose it with closing </a> tag.
12. Define <br> Line Break tag to insert a Single line break.
13. Define <ul> tag to define Unordered List. To add elements in a list
we have to define <li> i.e. List item tags to add items in a list.
14. Enclose it with closing </ul> tag.
15. Define <ol> tag to define Ordered List. To add elements in a list we
have to define <li> i.e. List item tags to add items in a list.
16. Enclose it with closing </ol> tag.
17. To add a table in HTML doc. we need to define a <table> tag, <tr>
tag for adding rows in a table & <td> to add the Data in table row.
CODING:
1: HTML Paragraph Tag:
<html>
<head>
<title>Paragraph</title>
</head>
<body>
<p> This is first Paragraph </p>
</body>
</html>
2. Page | 2
2: HTML Heading Tag:
<html>
<head>
<title>Heading</title>
</head>
<body>
<h1> This is first heading </h1>
<h2> This is Second heading </h2>
</body>
</html>
3: HTML Image Tag:
<html>
<head>
<title>Image</title>
</head>
<body>
<img src="logo.jpg" width="380" height="70" />
</body>
</body>
</html>
4: HTML Link Tag:
<html>
<head>
<title>Link</title>
</head>
<body>
<a href="http://www.google.com"> Click here!! </a>
</body>
</body>
</html>
3. Page | 3
5: HTML Line Break Tag:
<html>
<head>
<title>Break tag</title>
</head>
<body>
<p>Hello<br>
Hi<br>
How are you? <br>
</p>
</body>
</body>
</html>
6: HTML Unordered List Tag:
<html>
<head>
<title>Unordered List</title>
</head>
<body>
<ul>
<li>Coffee</li>
<li>Milk</li>
<li>Tea</li>
</ul>
</body>
</body>
</html>
7: HTML Ordered List Tag:
<html>
<head>
<title>Ordered List</title>
</head>
<body>
<ol>
<li>Coffee</li>
<li>Milk</li>
7. Page | 7
PROGRAM: 3
AIM: To implement webpage Employment detail in HTML
ALGORITHM:
1. Create <HTML> tag.
2. Use <center> tag for alignment of text in center.
3. Create a form method by using
<form method="get"onsubmit="validate()">
4. Create <table> tag and insert the data which you want to add in the
table in its rows. i.e.:
5. <tr>
6. <td> INSERT ELEMENTS </td>
7. </tr>
8. Add input fields by using: <input type="text"first name="t1" size="20">
9. Add Radio Buttons by using: <input type="radio" value="Male"
name="r1">Male
10. Close the </table> tag.
11. Close the </form> tag.
12. Close </html> tag.
CODING:
<html>
<center>
<h1>EMPLOYMENT DETAILS FORM </h1>
</center>
<body bgcolor= "cyan">
<CENTER>
<form method="get"onsubmit="validate()">
<table border=8px; bgcolor= "pink">
<fontface="Century Gothic" font color="white">
<th id="name" colspan="2" bgcolor="WHITE">ENTER
DETAILS</th>
<tr><td>Enter first Name</td>
<td><input type="text"first name="t1"
size="20"></td></tr>
<tr><td>Enter last Name</td>
<td><input type="text"last name="t1"
size="20"></td></tr>
13. Page | 13
2: Binary Search:
ALGORITHM:
1. Create <HTML> tag.
2. Add <script type=”text/JavaScript”> for using Java Script.
3. Input the values of size , elements and the item to be searched.
4. function binaryIndexOf(searchElement) { 'use strict';
5. var minIndex = 0;
6. var maxIndex = this.length - 1;
7. var currentIndex;
8. var currentElement;
9. while (minIndex <= maxIndex) {
10. currentIndex = (minIndex + maxIndex) / 2 | 0;
11. currentElement = this[currentIndex];
12.
13. if (currentElement < searchElement) {
14. minIndex = currentIndex + 1;
15. }
16. else if (currentElement > searchElement) {
17. maxIndex = currentIndex - 1;
18. }
19. else {
20. return currentIndex;
21. }
22. }
23.
24. return -1;
25. }
26. Close </script> & <HTML> tag.
CODING:
<html>
<head>
<title>Binary Search</title>
<script type="text/javascript">
14. Page | 14
function binary()
{
var n=parseInt(prompt("enter the size of an array:
"));
var a=new Array(n);
var p=0;
for(var i=0;i<a.length;i++)
{
a[i]=parseInt(prompt("enter array elements"));
}
for(var i=0;i<a.length;i++)
{
for(var j=i+1;j<a.length;j++)
{
if(a[i]>a[j])
{
var t=a[i];
a[i]=a[j];
a[j]=t;
}
}
}
var k=parseInt(prompt("enter the key element "));
var i=0;
var u=parseInt(a.length-1);
while(i<=u)
{
var m=parseInt((i+u)/2);
if(k==a[m])
{
p=1;
break;
}
else if(k>a[m])
{
i=m+1;
}
else if(k<a[m])
{
u=m-1;
}
}
if(p==1)
document.writeln("element found at :"+m);
16. Page | 16
PROGRAM: 6
AIM: To create Coconut tree in applet.
ALGORITHM:
1. Import Java applet
2. Create a class which extends Applet class
3. Create a public function : public void paint (Graphics g)
4. Set the color of element you wants to add by:
5. g.setColor(Color.red)
6. Create the element by determining its shape:
7. g.fillRect(10,20,30,40)
CODING:
import java.applet.*;
import java.awt.*;
public class tree extends Applet
{
public void paint(Graphics g)
{
g.setColor(Color.black);
g.drawString("COCONUT TREE",200,50);
g.drawArc(120,100,50,300,130,120);
g.drawArc(140,100,50,300,130,120);
g.drawArc(110,90,50,250,0,150);
g.drawArc(140,90,50,300,20,140);
g.drawArc(105,35,50,300,30,110);
g.drawOval(150,110,20,30);
g.drawOval(130,110,20,30);
g.drawOval(140,120,20,30);
g.drawLine(125,155,145,155);
g.drawLine(120,200,140,200);
21. Page | 21
PROGRAM: 8
AIM: To perform operation on Employee table using JDBC Connectivity.
ALGORITHM:
1. Loading the Drivers:
2. Class.forName()
3. DriverManager.registerDriver()
4. Create the Connections
5. Create the statement.
6. Execute the Query.
7. Close the Connection.
CODING:
import java.sql.*;
class EmployeeRecord
{
public static final String DBURL =
"jdbc:oracle:thin:@localhost:1521:XE";
public static final String DBUSER = "local";
public static final String DBPASS = "test";
public static void main(String args[])
{
try
{
//Loading the driver
Class.forName("oracle.jdbc.driver.Oracl
eDriver");
//Cretae the connection object
Connection con =
DriverManager.getConnection(DBURL, DBUSER, DBPASS);
//Insert the record
String sql = "INSERT INTO emp (emp_id,
empname, email, city) VALUES (?, ?, ?, ?)";
PreparedStatement statement =
con.prepareStatement(sql);
statement.setInt(1, 100);
statement.setString(2, "Prashant");
22. Page | 22
statement.setString(3,
"prasant@saxena.com");
statement.setString(4, "Pune");
int rowsInserted =
statement.executeUpdate();
if (rowsInserted > 0)
{
System.out.println("A new employee
was inserted successfully!n");
}
// Display the record
String sql1 = "SELECT * FROM Emp";
Statement stmt = con.createStatement();
ResultSet result =
stmt.executeQuery(sql1);
while (result.next())
{
System.out.println
(result.getInt(1)+" "+
result.getString(2)+" "+
result.getString(3)+" "+
result.getString(4));
}
//Update the record
String sql2 = "Update Emp set email = ?
where empname = ?";
PreparedStatement pstmt =
con.prepareStatement(sql2);
pstmt.setString(1, "Jaya@gmail.com");
pstmt.setString(2, "Jaya");
int rowUpdate = pstmt.executeUpdate();
if (rowUpdate > 0)
{
System.out.println("nRecord
updated successfully!!n");
}
//Delete the record
23. Page | 23
String sql3 = "DELETE FROM Emp WHERE
empname=?";
PreparedStatement statement1 =
con.prepareStatement(sql3);
statement1.setString(1, "Prashant");
int rowsDeleted =
statement1.executeUpdate();
if (rowsDeleted > 0)
{
System.out.println("A Employee was
deleted successfully!n");
}
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
RESULT: Program executes successfully.
24. Page | 24
PROGRAM: 9
AIM: To create a Personal Webpage using HTML & CSS
ALGORITHM:
1. Create <HTML> tag
2. Add Title <title> tag
3. Create first Division (DIV) by using CSS Property :
4. .CONT{
5. POSITION:fixed;
6. TOP:1;
7. WIDTH:330;
8. HEIGHT:1350;
9. BACKGROUND-COLOR:#424242;
10. box-shadow: 8px 8px 5px #888888;
11. }
12. Create Second Div :
13. .CONT2{
14. POSITION:ABSOLUTE;
15. TOP:1;
16. LEFT:350;
17. WIDTH:1000;
18. HEIGHT:1350;
19. BACKGROUND-COLOR:#FCFFD5 ;
20. COLOR:WHITE;
21. }
22. Create <body> of the program.
23. Add the declaration of first Division by:
24. <DIV CLASS=CONT> and add the elements you wants to add inside it.
25. Close it by using </div> tag
26. Add the declaration of Second Division by:
27. <DIV CLASS=CONT2> and add the elements you wants to add inside it.
28. Close it by using </div> tag
29. Close </body> and </html> tag.
CODING:
<html>
<head>
30. Page | 30
PROGRAM: 10
AIM: To create a webpage for university using HTML.
ALGORITHM:
1. Create <HTML> tag.
2. Add background color; <body bgcolor=”red”>
3. Define a table by using <table> tag.
4. Add the contents in the table i.e. the Logo and the Title.
5. Create another table and add the links of other pages into it. i.e.
Home, About, Admission, Contact us, Results.
6. Add links of these pages by <a href=”home.html”>HOME</a>
7. Create a paragraph to write the contents <p>
8. Add image by using <img src=”image.jpg”> tag
9. Add the elements according to your requirements.
CODING:
1:Home page:
<html>
<head>
<title>Admission form</title>
<body>
<center>
<body bgcolor="FFCC99">
<table><table border=0px; bgcolor= "CC6633"
width="1350" height="200">
<tr>
<td><img src="logo.png" width="150" height"150"></td>
<td><font color="yellow" face="Tahoma"><u>
<h1>MOHAMMAD ALI JAUHAR UNIVERSITY</h1></u>
<font color="white" face="Tahoma">
<h2>Jauhar Nagar, Rampur, U.P., India</h2>
</td></tr></th>
</table>
<table><table border=0px; bgcolor= "yellow"
width="1350">
<tr>
31. Page | 31
<td><font color="black" face="Tahoma"><b><CENTER><a
href="home.html">HOME</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="about.html">ABOUT</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="admissions.html">ADMISSIONS</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="contact.html">CONTACT US</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="results.html">RESULTS</a></td>
</tr>
</table>
<br><br>
<table><table border=0px; bgcolor= "FFCC99"
width="1350">
<tr>
<td>
<font size="6" color="RED" face="Tahoma"><B>
WELCOME<BR></B>
<font size="4" color="black" face="Tahoma">
The Mohammad Ali Jauhar University situatied at Rampur
is one of the best institution which provides quality
education,
The university was establish by Ex-Cabinet Minister
Mohammad Azam Khan.
Mohammad Ali Jauhar University, Rampur was established
in the year 2006 by an Act of State Legislature of
Uttar Pradesh. It is approximately 12 km from Rampur
Railway Station. The University caters courses in
various streams of Science, Humanities, Law,
Education, Commerce, Engineering & Technology,
Paramedical Sciences including Nursing, Mass
Communication and Agriculture and is almost prepare to
start a Medical College named as Jauhar Institute of
Medical Sciences (JIMS).
</td>
<td><img src="img.jpg" width="400" height="250"></td>
</tr>
<tr><td>
<ul><li><font size="5" color="black" face="Tahoma">
HIGHEST ORDER
32. Page | 32
<br>
Our objective is to impart multidisciplinary education
at UG/PG and PhD level of excellent level.
</td>
<tr><td>
<ul><li><font size="5" color="black" face="Tahoma">
RANKING
<br>
Mohammad Ali Jauhar University has been placed at high
rank among Indian private universities by several
magazines and newspapers.
</td>
<tr><td>
<ul><li><font size="5" color="black" face="Tahoma">
SKILLED FACULTY
<br>
Excellent faculty as per UGC norms is the criteria of
induction. Devoted and dedicated faculty who not only
interact with the students in the classrooms but
beyond the classrooms to enthuse them for the pursuit
of knowledge in their subjects of study, consciousness
about the environment and their social
responsibilities is our trade mark.
</td>
</table>
<center>
<font color="BLACK" face="Tahoma">
<font color="BLACK" face="Tahoma"
size="3"><br><br><br><br>
<H3>Page Design by MOHD.BILAL</H3>
<h4>Contact: bilalmirza.01@gmail.com</h4>
</body>
</html>
2:About:
<html>
<head>
<title>Admission form</title>
<body>
33. Page | 33
<center>
<body bgcolor="FFCC99">
<table><table border=0px; bgcolor= "CC6633"
width="1350" height="200">
<tr>
<td><img src="logo.png" width="150" height"150"></td>
<td><font color="yellow" face="Tahoma"><u>
<h1>MOHAMMAD ALI JAUHAR UNIVERSITY</h1></u>
<font color="white" face="Tahoma">
<h2>Jauhar Nagar, Rampur, U.P., India</h2>
</td></tr></th>
</table>
<table><table border=0px; bgcolor= "yellow"
width="1350">
<tr>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="home.html">HOME</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="about.html">ABOUT</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="admissions.html">ADMISSIONS</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="contact.html">CONTACT US</a></td>
<td><font color="black" face="Tahoma"><b><CENTER><a
href="results.html">RESULTS</a></td>
</tr>
</table>
<font SIZE="5" color="black" face="Tahoma">
<BR>
WELCOME TO<br><font color="red" size="8"><b>
JAUHAR UNIVERSITY</b>
<br><font color="black" size="4"></center><ul><li>
Mohammad Ali Jauhar University, Rampur was established
in the year 2006 by an Act of State Legislature of
Uttar Pradesh. It is approximately 12 km from Rampur
Railway Station. The University caters courses in
various streams of Science, Humanities, Law,
Education, Commerce, Engineering & Technology,
Paramedical Sciences including Nursing, Mass
Communication and Agriculture and is almost prepare to
34. Page | 34
start a Medical College named as Jauhar Institute of
Medical Sciences (JIMS).
</li><br><li>The University campus is spread over more
than 350 acres and has vast lush green, health
sustaining and beautiful landscapes. The bio-
aesthetics is further enhanced with the presence of a
very huge water body – a source of rich floral and
faunal diversity. Ultra modern infrastructure designed
by eminent architects is the signature of its beauty.
The tranquil ambience of the premises creates the
ideal environment for serious study.
</li><br><li>Stress is also being given on physical
fitness of the students and for this the University
has paid adequate attention on promotion of sports on
campus. A huge, well-equipped, hi-tech gymnasium with
indoor games facilities, viz. badminton, chess, carom,
table tennis and outdoor games like football, hockey,
cricket, lawn tennis, volleyball, horse riding etc.
have been created. National and
state level sport competitions are periodically
organized by the University. Along with this a stadium
with latest facilities is also underway on completion
to promote sports with studies.
The objective of the University is to mark excellence
in its academic programs and sports. The University is
committed to its social mission of making education
possible to sons and daughters of persons of the down-
trodden sections of the society and Muslim minority as
well.
</ul></li>
</TABLE>
<center>
<font color="BLACK" face="Tahoma"
size="3"><br><br><br><br>
<H3>Page Design by MOHD.BILAL</H3>
<h4>Contact: bilalmirza.01@gmail.com</h4>
</body>
</html>
42. Page | 42
<a
href="http://jauharuniversity.edu.in/results.html">CLI
CK HERE</a> to check the result
</TABLE>
<center>
<font color="BLACK" face="Tahoma"
size="3"><br><br><br><br>
<H3>Page Design by MOHD.BILAL</H3>
<h4>Contact: bilalmirza.01@gmail.com</h4>
</body>
</html>
RESULT: Program executes successfully.