Pin It

How to decorate form in a JSP using fieldset and legend tag ?.

A simple JSP decoration application using Fieldset and legend tag

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>User Details</title>
</head>

<body>
	<table bgcolor="pink" border="0" cellpadding="0" cellspacing="0"
		align="center" width="760">
		<tr>
			<td>

				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td valign="top" align="left"
							style="padding-left: 0px; padding-right: 0px; padding-top: 0px; 
							padding-bottom: 0px; font: 24px/30px Georgia; width: 228px; 
							color: #768e4e; height: 37px">
							User Details</td>
					</tr>
				</table>

			</td>
		</tr>
		<tr>
			<td>
				<form action="" method="post">
					<table border="0" cellpadding="0" cellspacing="2">

						<tr>
							<td align="right">
								<fieldset>
									<legend
										style="font-size: 18px; font-weight: bold; 
										color: maroon; font-family: Georgia, serif;">

										UserDetails </legend>
									<table border="0" cellpadding="3" cellspacing="0">
										<tr>
											<td align="right"><font
												style="font-size: 15px; 
												font-family: Arial, Times, serif; font-weight: bold">First
													Name:</font></td>
											<td><input name="txtFirstName" maxlength="25" size="50">
											</td>
										</tr>

										<tr>
											<td align="right"><font
												style="font-size: 15px; 
												font-family: Arial, Times, serif; font-weight: bold">Last
													Name:</font></td>
											<td><input name="txtLastName" maxlength="25" size="50">
											</td>
										</tr>

										<tr>
											<td align="right"><font
												style="font-size: 15px; font-family: Arial, Times, serif;
												 font-weight: bold">Password:</font>
											</td>
											<td><input type="password" name="txtLastName"
												maxlength="25" size="50"></td>
										</tr>
									</table>
								</fieldset>
							</td>
						</tr>

						<tr>
							<td align="right">
								<fieldset>
									<legend
										style="font-size: 18px; font-weight: bold; 
										color: maroon; font-family: Georgia, serif;">

										ContactDetails </legend>
									<table border="0" cellpadding="3" cellspacing="0">
										<tr>
											<td align="right"><font
												style="font-size: 15px; 
												font-family: Arial, Times, serif; font-weight: bold">Email
													Address:</font></td>
											<td><input name="txtEmailAddress" maxlength="48"
												size="50"></td>
										</tr>

										<tr>
											<td align="right"><font
												style="font-size: 15px; 
												font-family: Arial, Times, serif; font-weight: bold">Mobile
													Number:</font></td>
											<td><input name="txtMobileNumber" maxlength="25"
												size="50"></td>
										</tr>
									</table>
								</fieldset>
							</td>
						</tr>


						<tr>
							<td align="right"><br /> <input type="submit"
								name="btnSubmit" value="Submit" /></td>
						</tr>

					</table>
				</form>
			</td>
		</tr>
	</table>

</body>
</html>





Output of the program : 
 


Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Related Posts Plugin for WordPress, Blogger...

Post your related queries below ...

comments powered by Disqus
Powered by Blogger.
 
© 2012 Learn Java by Examples Template by Hubber Spot