Follow by Email

Thursday, July 26, 2012

HTML Give border title in div

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%;">
    <legend style="color:blue;font-weight:bold;">Initiator Information</legend>

      <table  border="0" cellpadding="0" cellspacing="5" >
          <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>
          <td><label for="userDepartment"></label>
            <input type="text" name="userDepartment" id="userDepartment" /></td>
          <td><label for="userDevision"></label>
            <input type="text" name="userDevision" id="userDevision" /></td>

The above code will show the div in browser like below

No comments:

Post a Comment