In HTML to have a table with title in it's border like we can have in swing , we can use div element like shown in below code snipet
<div style="width:100%;">
<fieldset>
<legend style="color:blue;font-weight:bold;">Initiator Information</legend>
<table border="0" cellpadding="0" cellspacing="5" >
<tr>
<td width="146">User Id</td>
<td width="216"><label for="userId"></label>
<input type="text" name="userId" id="userId" /></td>
<td width="122">Name</td>
<td width="474"><input type="text" name="userName" id="userName" /></td>
</tr>
<tr>
<td>Department</td>
<td><label for="userDepartment"></label>
<input type="text" name="userDepartment" id="userDepartment" /></td>
<td>Division</td>
<td><label for="userDevision"></label>
<input type="text" name="userDevision" id="userDevision" /></td>
</tr>
</table>
</fieldset>
</div>
The above code will show the div in browser like below
<div style="width:100%;">
<fieldset>
<legend style="color:blue;font-weight:bold;">Initiator Information</legend>
<table border="0" cellpadding="0" cellspacing="5" >
<tr>
<td width="146">User Id</td>
<td width="216"><label for="userId"></label>
<input type="text" name="userId" id="userId" /></td>
<td width="122">Name</td>
<td width="474"><input type="text" name="userName" id="userName" /></td>
</tr>
<tr>
<td>Department</td>
<td><label for="userDepartment"></label>
<input type="text" name="userDepartment" id="userDepartment" /></td>
<td>Division</td>
<td><label for="userDevision"></label>
<input type="text" name="userDevision" id="userDevision" /></td>
</tr>
</table>
</fieldset>
</div>
The above code will show the div in browser like below
No comments:
Post a Comment