HTML code sampels

A simple form with out allignment

<html> <head> <title> A simple form with out allignment</title> </head> <body> <form> Enter name:<input type="text" name="nametext" size="10"><br> Enter your mark:<input type="text" name="marktext" size="10"><br> <input type="submit"><input type="reset"> </form> </body> </html>
Output:
A simple form with out allignment
Enter name:
Enter your mark:

A simple form with allignment using table

Enter name:
Enter your mark:

Source code

<html> <head> <title>Uisng table for allignment</title> </head> <body> <form> <table> <tr> <td>Enter name:</td><td><input type="text" name="nametext" size="10"></td></tr> <tr> <td>Enter your mark:</td><td><input type="text" name="marktext" size="10"></td></tr> <tr><td><input type="submit"><input type="reset"></td></tr> </table> </form> </body> </html>

table with legend

use of Legend in Html

The legend in html -used when you create a form

Personal Data:







Sorce code

<!DOCTYPE html> <html> <head> <title>use of Legend in Html</title> </head> <body> <h1>The legend in html -used when you create a form</h1> <form action="/any server side code like asp,php,servelt,jsp,cgi..."> <fieldset> <legend>Personal Data:</legend> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <label for="email">Email:</label> <input type="email" id="email" name="email"><br><br> <label for="birthday">Birthday:</label> <input type="date" id="birthday" name="birthday"><br><br> <input type="submit" value="Submit"> </fieldset> </form> </body> </html>

Form using legend -size of form is important,it shoud not take the whole width

use of Legend in Html size of form matters

The legend in html -used when you create a form

Personal Data:







Source Code

<!DOCTYPE html> <html> <head> <title>use of Legend in Html size of form matters</title> </head> <body> <h1>The legend in html -used when you create a form</h1> <table width="30%"> <tr> <td> <form action="/any server side code like asp,php,servelt,jsp,cgi..."> <fieldset> <legend><b><i>Personal Data:</i></b></legend> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <label for="email">Email:      </label> <input type="email" id="email" name="email"><br><br> <label for="birthday">Birthday:  </label> <input type="date" id="birthday" name="birthday"><br><br> <input type="submit" value="Submit"><input type="reset"> </fieldset> </form> </body> </html>

use of bgcolor

use of Legend in Html size of form matters

The legend in html -used when you create a form,bgcolor

Personal Data:







Source code

<!DOCTYPE html> <html> <head> <title>use of Legend in Html size of form matters</title> </head> <body> <h1>The legend in html -used when you create a form,bgcolor</h1> <table width="30%" bgcolor="#336699"> <tr> <td> <form action="/any server side code like asp,php,servelt,jsp,cgi..."> <fieldset> <legend><b><i><font color="red">Personal Data:</font></i></b></legend> <label for="fname">First name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Last name:</label> <input type="text" id="lname" name="lname"><br><br> <label for="email">Email:      </label> <input type="email" id="email" name="email"><br><br> <label for="birthday">Birthday:  </label> <input type="date" id="birthday" name="birthday"><br><br> <input type="submit" value="Submit"><input type="reset"> </fieldset> </form> </body> </html>

No comments:

Post a Comment

python training with real time projects

java script-text to speech-assignment-Fatima Solkar Final Year-BE I.T FAMT-Ratnagiri-Maharastra

Page Title Mandvi Beach Ratnagiri At a distance of 2 km from Ratnagiri Bus Stand, Mandvi Beach i...

Technical Skills for B.Com and B.B.A