0% found this document useful (0 votes)
17 views

HTML Programs

The document contains code for an HTML form with fields like name, father's name, address, sex, city, course, district, state, pin code, email, date of birth, mobile number. It includes validation of fields on form submit and uses tables, radio buttons, dropdowns and checkboxes for data entry.

Uploaded by

purimetla36
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

HTML Programs

The document contains code for an HTML form with fields like name, father's name, address, sex, city, course, district, state, pin code, email, date of birth, mobile number. It includes validation of fields on form submit and uses tables, radio buttons, dropdowns and checkboxes for data entry.

Uploaded by

purimetla36
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

<html>

<head></head>

<title></title>

<style>

table{

background-color:yellow;

th{

color:red;

font-family:Comic sans MS;

tr{

background-color:violet;

marquee{

background-color:red;

text-decoration:underline black;

</style>

<body>

<h1 align="center" style="color:red; font-family:Comic sans MS;">PURIMETLA ASHWINI</h1>

<table border="5" width="300px" height="400"><tr>

<th>NAME</th>
<th>MARKS</th>

<th>PERCENTAGE</th></tr>

<tr><td colspan="3">ashwini</td>

</tr>

<tr>

<td rowspan="3"><pre>

</pre></td>

<td >kavya</td>

<td >kavya</td>

</tr>

<tr >
<td>anusha</td>

<td >kavya</td>

</tr>

<tr>

<td>anusha</td>

<td >kavya</td>

</tr>

</table>

<marquee direction="left" scrollamount="3"> THIS IS ASHWINI CHOWDARY</marquee>

</body>

</html>

<html>

<head></head>

<title></title>

<style>

table{

background-color:yellow;

}
img{

float:left;

position:relative;

top:-20px;

right: 0px;

</style>

<body>

<h1 align="center" style="color:red; font-family:Comic sans MS;">PURIMETLA ASHWINI</h1>

<table border="5" width="600px" height="400"><tr><td>

<img src="C:\Users\ashwi\Downloads\CSEIMAGE.jpg">

</td>

<td colspan="2" >

<h2 align="centre">ashwinii<br>Actor</h2></td>

</td>

</tr>

<tr>

<td >

<h2 align="centre">Contact details</h2>

</td>

<td >

<a href="C:/Users/vishn/Downloads/page.html">

<h2 align="centre">About</h2></a></td>
<td >

<h2 align="centre">Education details</h2></td>

</td>

</tr>

<tr>

<td>

<h3><p>Mobile:9988776655<br>Mail:[email protected]<br>Twitter:@tomholand2013</p></h3>

</td>

<td colspan="2">

<h3><p>School: BRIT School-(2002-2012)<br>Inter:Jhonson public college(2013-2014)<br>Graduation:


NewYork Technical University</p></h3>

</td>

</tr>

</table>

</body>

</html>

Form Validation
<html>
<body>
<script>
function validateform(){
var name=document.myform.name.value;
var
password1=document.myform.password1.v
alue;
var
password2=document.myform.password2.v
alue;
var x=document.myform.email.value;
var atposition=x.indexOf("@");
var dotposition=x.lastIndexOf(".");

if (name==null || name==""){
alert("Name can't be blank");
return false;
}else if(password1.length<6){
alert("Password must be at least 6
characters long.");
return false;
}
else if (password1!=password2)
{ alert("Password must be match with
above");
return false;
}
else if (atposition<1 ||
dotposition<atposition+2 ||
dotposition+2>=x.length){
alert("Please enter a valid e-mail address
");
return false;
}

}
</script>
<body>
<form name="myform" method="post"
action="" onsubmit="return validateform()"
>
Name: <input type="text"
name="name"><br/>
Password: <input type="password"
name="password1"><br/>
Re Type Password: <input type="password"
name="password2"><br/>
Email: <input type="text"
name="email"><br/>

<input type="submit" value="register">


</form>
</body>
</html>
APPLICATION FORM
<html>

<head>

<script></script>

</head>

<body>
<form action="#" name="StudentRegistration"
onSubmit="return(validate());">

<table width="50%" bgcolor="99FFFF" align="center" >

<tr>

<td colspan=2>

<center><h2><b>Student Registration Form</b></h2></center>

</td>

</tr>

<tr>

<td>Name</td>
<td><input type=text name="textnames" id="textname"
size="30"></td>

</tr>

<tr>

<td>Father Name</td>

<td><input type="text" name="fathername" id="fathername"

size="30"></td>

</tr>

<tr>
<td>Personal Address</td>

<td><textarea rows="3" cols="30" ></textarea></td>

</tr>

<tr>

<td>Sex</td>

<td><input type="radio" name="sex" value="male" size="20">Male

<input type="radio" name="sex" value="Female"


size="20">Female</td>

</tr>
<tr>

<td>City</td>

<td><input type="text" name="city" id="city" size="30"></td>

</tr>

<tr>

<td>Course</td>

<td><input type="text" name="text" id="text" size="30"></td>

</tr>

<tr>
<td>District</td>

<td><select name="District">

<option value="-1" selected>select..</option>

<option value="Nalanda">NALANDA</option>

<option value="UP">UP</option>

<option value="Goa">GOA</option>

<option value="Patna">PATNA</option>

</select></td>

</tr>
<tr>

<td>State</td>

<td><select Name="State">

<option value="-1" selected>select..</option>

<option value="New Delhi">NEW DELHI</option>

<option value="Mumbai">MUMBAI</option>

<option value="Goa">GOA</option>

<option value="Bihar">BIHAR</option>

</select></td>

</tr>
<tr>

<td>PinCode</td>

<td><input type="text" name="pincode" id="pincode"


size="30"></td>

</tr>

<tr>

<td>EmailId</td>

<td><input type="text" name="emailid" id="emailid" size="30"></td>

</tr>

<tr>
<td>DOB</td>

<td><input type="text" name="dob" id="dob" size="30"></td>

</tr>

<tr>

<td>MobileNo</td>

<td><input type="text" name="mobileno" id="mobileno"


size="30"></td>

</tr>

<tr>

<td><input type="reset"></td>
<td colspan="2"><input type="submit" value="Submit Form"
size="30"></td>

</tr>

<tr><td colspan="2"><input type="checkbox" ><label>I hereby agree to


abide by the terms and conditions as provided in the College. I
understand that any violation of the aforesaid terms and conditions
may result in the revocation of my access privileges and/or disciplinary
action may be taken.</label>

</td></tr>

</table>

</form>

</body>

</html>

You might also like