Professional Documents
Culture Documents
<body>
<header>
<nav>
<ul id="nav_bar">
<li class="nav-links" id="gmail"><a
href="#">Gmail</a></li>
<li class="nav-links"><a
href="#">Images</a></li>
<li id="sign_in"><a href="#">Sign
In</a></li>
</ul>
</nav>
</header>
OUTPUT:
PROGRAM-3
Write a program in HTML to display your CV in navigator,your Institute Website,Department Website
and Tutorial website for specific subject.
HTML CODE:(CV.html)
<html>
<head>
<title>DISPLAY CV</title>
<style>
.hero-image {
background-image: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ),url("mgmBG.jpg");
background-color: #92a8d1;
height: 700px;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #111;
}
.active {
background-color: #4CAF50;
}
.hero-text {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
}
</style>
</head>
<body>
<div class="hero-image">
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li style="float:right"><a class="active" href="ShalomCV.html">CV</a></li>
</ul>
<div class="hero-text">
<h1 style="font-size:50px">Welcome to MGMCOET,NOIDA</h1>
<h3>And I'm Shalom T Alexander who made this website</h3>
<button>Hire me</button>
</div>
</div>
</body>
</html>
HTML CODE:(ShalomCV.html)
<html>
<head>
<title>Shalom Resume</title>
</head>
<body>
<h1>RESUME</h1>
<p>Name: Shalom T Alexander</p>
<p>Roll.no: 1709510038</p>
<p>Branch: Btech</p>
<p>Course: CSE</p>
<p>College: MGMCOET</p>
</body>
</html>
OUTPUT:
PROGRAM-4
Write an HTML program to design an entry form of student details and send it to store at database
server like SQL, Oracle or MS Access.
HTML CODE:(studentForm.html)
<html>
<head>
<title>Student Form</title>
</head>
<body align="center">
<h1>Enter Your Details</h1>
<form>
Full Name:
<input type="text" name="Name"><br><br>
College Name:
<input type="text" ><br><br>
Course:
<select name="course">
<option value="B. Tech">B. Tech</option>
<option value="M. Tech">M. Tech</option>
</select><br><br>
Branch:
<select name="branch">
<option value="Civil">Civil</option>
<option value="Computer Science">Computer Science</option>
<option value="Mechanical">Mechanical</option>
<option value="Electronics">Electronics</option>
</select><br><br>
Roll no:
<input type="text" name="Roll"><br><br>
</form>
</body>
</html>
OUTPUT:
PROGRAM-5
Demonstrate the use of stylesheet in HTML.
HTML CODE:(form.html)
<html>
<head>
<title>FORM</title>
<link rel="stylesheet" href="stylesheet.css" >
</head>
<body align="center">
<form>
<h1>Login Form</h1>
<div class="green-square">
<div class="formcontainer">
<div class="container">
<label for="uname"><strong>Username</strong></label>
<input type="text" placeholder="Enter Username" name="uname" required>
<label for="psw"><strong>Password</strong></label>
<input type="password" placeholder="Enter Password" name="psw" required>
</div>
<button type="submit">Login</button>
</form>
</body>
</html>
CSS Code:(stylesheet.css)
body {
background-image:url("bg3.jpg");
font-family: Roboto, Arial, sans-serif;
justify-content:"center";
h1 {
text-align:center;
fone-size:18;
margin-top:60px;
text-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
input[type=text], input[type=password] {
width: 100%;
padding: 16px 8px;
margin: 8px ;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
button {
background-color: #8ebf42;
color: white;
padding: 14px 0;
margin: 5px 0;
border: none;
cursor: grabbing;
width: 100%;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.formcontainer {
text-align: left;
margin: 10 auto;
width: 10px;
height: 50px;
padding: 25px;
position:center;
}
.container {
padding: 16px 0;
text-align:left;
margin:35px;
}
.formcontainer {
border-radius: 25px;
background-color: #42f58d;
width: 500px;
height: 400px;
position: center;
left: 50%;
margin-left:400px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
OUTPUT:
PROGRAM-6
Write a program using Java Script for Web Page to display browser Information.
HTML Code:(browser.html)
<html>
<head>
<title>Browser Information</title>
</head>
<body>
<h1>Browser Information</h1>
<ul>
<script LANGUAGE="Javascript" type="text/javascript">
document.write("<li><b>Code Name:</b>"+ navigator.appCodeName);
document.write("<li><b>App Name:</b>"+ navigator.appName);
document.write("<li><b>App Version:</b>"+ navigator.appVersion);
document.write("<li><b>User Agent:</b>"+ navigator.userAgent);
document.write("<li><b>Language:</b>"+ navigator.language);
document.write("<li><b>Platform:</b>"+ navigator.platform);
</script>
</ul>
</body>
</html>
OUTPUT:
PROGRAM-7
To install Tomcat web server and Apache.
PROGRAM-8
Write a program to use Java Applet in HTML.
Open Notepad and Type the following code and save it as “First.java”.
Code:
import java.applet.Applet;
import java.awt.Graphics;
public class First extends Applet
{
public void paint(Graphics g)
{
g.drawString("welcome",300,300);
}
}
Now Make another file named as “myapplet.html” with the following code:
//name of the class should be same as java file made
<html>
<body>
<applet code="First.class" width="500" height="500">
</applet>
</body>
</html>
Open cmd and change the destination to the folder where you have saved these two files.
Now type “javacFirst.java” and this will make a new file in your folder named “First.class”.
Now type “appletviewer myapplet.html” and Java applet will appear with the message.
OUTPUT:
PROGRAM-9
Write a Java applet to display the Application Program screen i.e. calculator.
Code for cal.java:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
/*
<applet code="cal" width=300 height=300>
</applet>
*/
public class cal extends Applet
implements ActionListener
{
String msg=" ";
int v1,v2,result;
TextField t1;
Button b[]=new Button[10];
Button add,sub,mul,div,clear,mod,EQ;
char OP;
public void init()
{
Color k=new Color(120,89,90);
setBackground(k);
t1=new TextField(10);
GridLayoutgl=new GridLayout(4,5);
setLayout(gl);
for(inti=0;i<10;i++)
{
b[i]=new Button(""+i);
}
add=new Button("add");
sub=new Button("sub");
mul=new Button("mul");
div=new Button("div");
mod=new Button("mod");
clear=new Button("clear");
EQ=new Button("EQ");
t1.addActionListener(this);
add(t1);
for(inti=0;i<10;i++)
{
add(b[i]);
}
add(add);
add(sub);
add(mul);
add(div);
add(mod);
add(clear);
add(EQ);
for(inti=0;i<10;i++)
{
b[i].addActionListener(this);
}
add.addActionListener(this);
sub.addActionListener(this);
mul.addActionListener(this);
div.addActionListener(this);
mod.addActionListener(this);
clear.addActionListener(this);
EQ.addActionListener(this);
}
<head>
<title>FORM</title>
<link rel="stylesheet" href="stylesheet.css" >
</head>
<body>
<script>
function myfun(){
var a=document.getElementById("passwords").value;
var b=document.getElementById("passwordss").value;
if(a==""){
document.getElementById("messages").innerHTML="**Please fill the password";
return false;
}
if(a.length<5){
document.getElementById("messages").innerHTML="**Password Length Must be greater than 5
character";
return false;
}
if(a.length>25){
document.getElementById("messages").innerHTML="**Password length must not exceed 25 character";
return false;
}
if(a!=b){
document.getElementById("messages1").innerHTML="Password is not same in both the field";
return false;
}
}
</script>
<div class="green-square">
<div class="container">
<label for="uname"><strong>Username</strong></label>
<input type="text" placeholder="Enter Username" name="uname" value="" required>
<label for="psw"><strong>Password</strong></label>
<input type="password" id="passwords" placeholder="Enter Password" name="psw" value="" >
<span id="messages"> </span>
</form>
</body>
</html>
OUTPUT:
1.Password not same on both the field:
2.Password length must not exceed 25 character:
3.Password length must be greater than 5 character:
4.Please fill out this field: