Is there any way who delivers a nice clean look to the html form style and makes it easier to follow? Can we align the fields and make the form labels bold with addition of CSS?
Â
Â
Who delivers a nice clean look to the html form style
Â
 Yes it is possible to deliver a nice clean look to a html form by bolding the labels. For this you have to write a html code in which you can specify the width, font size, text alignment etc.Â
I am showing you a small example of a html form so that you can get a better idea. Â
Â
<FORM method="post">Â
Â
  <b>First name: </b><INPUT type="text" name="firstname"><BR><BR>Â
  <b>Last name: </b><INPUT type="text" name="lastname"><BR><BR>Â
  <b>email: </b><INPUT type="text" name="email"><BR><BR>Â
  <b> Sex :</b><INPUT type="radio" name="sex" value="Male"> MaleÂ
  <INPUT type="radio" name="sex" value="Female"> Female<BR><BR>Â
  <INPUT type="submit" value="Send"> <INPUT type="reset">Â
Â
</FORM> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
Â
This is the way you can write in html.Â
If you want to declare in CSS file then typeÂ
.form label { font-weight : bold; }Â
Then all the labels will be bold.Â
Â
Answered By
Reyad
0 points
N/A
#128841
Who delivers a nice clean look to the html form style
Â
Please try it..
<html>
<head>
<style rel="stylesheet" type="text/css">
.common{
font-weight:bold;
}
</style>
</head>
<body>
<form action="" method="post">
<table>
<caption>HTML Form</caption>
<tr>
<td class="common">Name</td>
<td><input type="text" name="name" maxlength="15" /></td>
</tr>
<tr>
<td class="common">Password</td>
<td><input type="password" name="pwd" maxlength="15" /></td>
</tr>
<tr>
<td class="common">Gender</td>
<td><input type="radio" name="sex" value="male"/>Male</td>
<td><input type="radio" name="sex" value="female"/>Female</td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" value="submit"/></td>
</tr>
</table>
</form>
</body>
</html>
thanks