0% found this document useful (0 votes)
41 views17 pages

Webtechlab

The document describes an experiment to write an XML program using DTD. It defines elements like document, employee, name, projects, project etc and provides a sample XML code with employee details and their projects.

Uploaded by

Pradeep Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views17 pages

Webtechlab

The document describes an experiment to write an XML program using DTD. It defines elements like document, employee, name, projects, project etc and provides a sample XML code with employee details and their projects.

Uploaded by

Pradeep Chauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Experiment no.

:- Date:-

EXPERIMENT NO- 1
Objective- Write HTML/Java scripts to display your CV in navigator, your Institute
website, Department Website and Tutorial website for specific subject.
<DOCTYPE HTML>

<html>

<body style="background-color:white;">

<div style="position:absolute;top:90px;left:800px;color:red;">

<p> <br><img src="pradeep786.jpg" height=" 150 pt">

</div>

<div style="padding-left:0px;margin-top:10px; ">

<p style="font-size:20pt; text-align: right"><a href="https://www.gniotgroup.edu.in

<a href="https://www.gniotgroup.edu.in /courses.php">

Greater Noida Institute Of Technology </a></p>

<h1 style="font-size:30pt; text-align:center"><i><span style="color:Black;">

<u>Curriculum Vitae</u></i></h1>

<div style="padding-left:150px;margin-top:3px; ">

<h1 style="font-size:20pt;"><i><span style="color:black;">

Pradeep Chauhan</span></i></h1>

<h4>8756126440</br> [email protected]</br> Greater Noida, Uttar Pradesh</br>

pin code - 201310</h4>

</div>

<div id="menu" style="background-color:white;width:150px;height:700px;float:left;">


</div>

<div id="content" style="background-color:white;float:left;width:700px;height:1800px;">

<h1 style="font-size:20pt;">Objective</h1>

1
Experiment no.:- Date:-

<p style="font-size:15pt; font-family:Bell MT">A motivated individual with in-depth


knowledge of languages and development tools, </br> seeking a position in a growth-oriented
company where I can use my skills to the</br> advantage of the company while having the scope
to develop my own skills. </p>

<h1 style="font-size:25pt;">EDUCATION AND QUALIIFICATIONS:</h1>

<table>

<tr>

<th>Qualification</th>

<th>Maximun Marks</th>

<th>Obtained Marks</th>

<th>Division</th>

<th>Institution</th>

<th>Bord/University</th>

</tr <tr>

<td>b.tech in progress</td>

<td>-----</td>

<td>-----</td>

<td>None</td>

<td>Greater Noida Institute Of Technology</td>

<td>A.K.T.University </td>

</tr>

<tr>

<td>Intermediate School</td>

<td>500</td>

<td>425</td>

<td>First</td>

<td>Deoria Senior Secondary School </td>

2
Experiment no.:- Date:-

<td>Central Board Of Secondary School </td>

</tr>

<tr>

<td>High School </td>

<td>500</td>

<td>442</td>

<td>First</td>

<td>P.G. Senior Secondary School</td>

<td> Central Board of Secondary Education</td>

</tr>

</table>

<hr>

<h1 style="font-size:15pt;">TECHNICAL EXPERIENCE:</h1>

Languages: HTML, CSS, Java script, C,C++ <br>

Concepts: Networking, operating systems, Data Science,Big Data

<hr>

<h1 style="font-size:15pt;">PERSONAL SKILLS:</h1>

1.Honesty<br>

2.Team Spirit<br>

3.Accepting Challenges

<hr>

<h1 style="font-size:15pt;">LANGUAGES:</h1>

hindi, english

<hr>

<h1 style="font-size:15pt;">INTEREST:</h1>

1.learning new programming language</br>

3
Experiment no.:- Date:-

2.Reading books</br>

3.website development

<hr>

<h1 style="font-size:15pt;">REFERENCE:</h1>

Will be provided on demand</pre>

<hr>

<h1>

</div>

</body>

</html>

4
Experiment no.:- Date:-

Output:-

5
Experiment no.:- Date:-

EXPERIMENT NO– 2

Objective:- Write an HTML program to design an entry form of Student details.

Code:-
<!-- Html Document Begins-->
<!DOCTYPE html>
<html>
<!-- Header Section-->
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
Student Registration Form
</title>
</head>

<!--Body of the Webpage-->


<body bgcolor="orange">

<!--Start of Form-->
<div style="margin: auto;width: 30%;">
<form>
<h2>Student Registration Form</h2>
<p>Fill in this form to register</p>

6
Experiment no.:- Date:-

<br>
<!--Input elemets for form-->
<label><b>First Name</b></label>
<input type="text" placeholder="Enter your first name" name="first_name" required>
<br>

<br>
<label><b>Last Name</b></label>
<input type="text" placeholder="Enter your last name" name="last_name" required>
<br>
<br>
<label><b>E-mail</b></label>
<input type="email" placeholder="Enter your e-mail" name="email" required>
<br>
<br>
<label><b>Date of Birth</b></label>
<input type="date" name="dob" required>
<br>
<br>
<label><b>Set Username</b></label>
<input type="text" placeholder="Set Username" name="username" required>
<br>
<br>
<label><b>Set Password</b></label>
<input type="password" placeholder="Set password" name="password" required>
<br>

7
Experiment no.:- Date:-

<br>
<label><b>Gender</b></label><br>
<input type="radio" name="gender" value="Male">
<label for="Male">Male</label><br>
<input type="radio" name="gender" value="Female">
<label for="Female">Female</label><br>
<input type="radio" name="gender" value="Others">
<label for="Others">Others</label>
<br>
<br>
<label><b>Course :</b></label>
<select>
<option value="Course">Course</option>
<option value="CS">Computer Fundamentals</option>
<option value="AI">Artificial Intelligence</option>
<option value="ML">Machine Learning</option>
<option value="OOPS">Object Oriented Programming</option>
<option value="DBMS">Database Management System</option>
</select>
<br>
<br>
<input type="button" value="Register"/>
</form>
</div>
</body>

</html> <!-- Html Document Ends-->

8
Experiment no.:- Date:-

Output:-

9
Experiment no.:- Date:-

EXPERIMENT No-3
Objective- Write programs using Java script for Web Page to display browsers
information.
Code: -

<!DOCTYPE HTML>

<html>

<head>

<title>

Get browser details through JavaScript

</title>

</head>

<body>

<!-- The text field -->

<div id="example"></div>

<script>

txt = "<p>Browser CodeName: " + navigator.appCodeName + "</p>";

txt+= "<p>Browser Name: " + navigator.appName + "</p>";

txt+= "<p>Browser Version: " + navigator.appVersion + "</p>";

document.getElementById("example").innerHTML=txt;

</script>

</body>

</html>

10
Experiment no.:- Date:-

Output:-

Browser CodeName: Mozilla

Browser Name: Netscape

Browser Version: 5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36


(KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0

11
Experiment no.:- Date:-

EXPERIMENT NO- 4
Objective:- Write an XML program using DTD.

Code:-

<?xml version = "1.0" standalone="yes"?>


<!DOCTYPE document [

<!ELEMENT document (employee)*>

<!ELEMENT employee (name, hiredate, projects)>

<!ELEMENT name (lastname, firstname)>


<!ELEMENT lastname (#PCDATA)>

<!ELEMENT firstname (#PCDATA)>

<!ELEMENT hiredate (#PCDATA)>


<!ELEMENT projects (project)*>

<!ELEMENT project (product,id,price)>

<!ELEMENT product (#PCDATA)>


<!ELEMENT id (#PCDATA)>

<!ELEMENT price (#PCDATA)>


]>
<document>

<employee>

<name>

<lastname>Kelly</lastname>
<firstname>Grace</firstname>

</name>

<hiredate>October 15, 2005</hiredate>


<projects>

<project>

<product>Printer</product>
<id>111</id>

<price>$111.00</price>

</project>
<project>

12
Experiment no.:- Date:-

<product>Laptop</product>

<id>222</id>
<price>$989.00</price>
</project>
</projects>

</employee>

<employee>
<name>

<lastname>Grant</lastname>

<firstname>Cary</firstname>
</name>

<hiredate>October 20, 2005</hiredate>

<projects>
<project>

<product>Desktop</product>

<id>333</id>
<price>$2995.00</price>

</project>

<project>
<product>Scanner</product>

<id>444</id>

<price>$200.00</price>
</project>

</projects>

</employee>

<employee>
<name>

<lastname>Gable</lastname>

<firstname>Clark</firstname>
</name>
<hiredate>October 25, 2005</hiredate>

13
Experiment no.:- Date:-

<projects>

<project>

<product>Keyboard</product>

<id>555</id>
<price>$129.00</price>

</project>

<project>
<product>Mouse</product>

<id>666</id>

<price>$25.00</price>
</project>

</projects>

</employee>
</document>

OUTPUT:-

] > Kelly Grace October 15,

2005 Printer 111 $111.00 Laptop 222 $989.00 Grant Cary

October 20,

2005 Desktop 333 $2995.00 Scanner 444 $200.00 Gable Clark

October 25,

2005 Keyboard 555 $129.00 Mouse 666 $25.00

14
Experiment no.: - Date:-

EXPERIMENT NO- 5

Objective:- Write a program to link program to database using JDBC.

Code:-
importjava.sql.*;
importjava.util.*;
class Main
{
public static void main(String a[])
{
//Creating the connection
String url = "jdbc:oracle:thin:@localhost:1521:xe";
String user = "system";
String pass = "12345";

//Entering the data Scanner k = new Scanner(System.in);


System.out.println("enter name");
String name = k.next();
System.out.println("enter roll no");
int roll = k.nextInt();
System.out.println("enter class");
String cls = k.next();

//Inserting data using SQL query


String sql = "insert into student1 values('"+name+"',"+roll+",'"+cls+"')";
Connection con=null;
try
{
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
//Reference to connection
interface con = DriverManager.getConnection(url,user,pass);
Statement st = con.createStatement();
int m = st.executeUpdate(sql);
if (m == 1)
System.out.println("inserted successfully : "+sql);
else
System.out.println("insertion failed");
con.close();
}

15
Experiment no.: - Date:-

catch(Exception ex)
{
System.err.println(ex);
}
}
}

Output:-

enter name

ABC

enter roll no

001

enter class

3CSE B

inserted successfully : insert into student Values (‘ABC’, 001, ‘3CSE B’);

16
Experiment no.: - Date:-

17

You might also like