Set em in a form to have underline text decoration and normal font style : em « Style Basics « HTML / CSS






Set em in a form to have underline text decoration and normal font style

  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
form em {
 text-decoration: underline;
 font-style: normal;
}
</style>
</head>

<body>
   <form id="msgform" name="msgform" method="post" action="/">
   <label for="fmtitle" accesskey="i">T<em>i</em>tle</label>
   <select name="fmtitle" id="fmtitle">
    <option value="ms">Ms.</option>
    <option value="mrs">Mrs.</option>
    <option value="miss">Miss</option>
    <option value="mr">Mr.</option>
   </select>
   <label for="fmname" accesskey="n"><em>N</em>ame</label>
   <input type="text" name="fmname" id="fmname" />
   <label for="fmemail" accesskey="e"><em>E</em>mail</label>
   <input type="text"  name="fmemail" id="fmemail" />
   <label for="fmstate" accesskey="a">St<em>a</em>te/Province</label> 
   <input type="text" name="fmstate" id="fmstate" />
   <label for="fmcountry" accesskey="y">Countr<em>y</em></label>
   <input type="text" name="fmcountry" id="fmcountry" />
   <label for="fmmsg" accesskey="m"><em>M</em>essage</label>
   <textarea name="fmmsg" id="fmmsg" rows="5" cols="14"></textarea>
   <input type="submit" name="submit" value="send" class="submit" />
  </form>
</body>

</html>

   
  








Related examples in the same category

1.Stylizing your text with EM and STRONG
2.Emphasis tag
3.Change em font
4.E in LI
5.em border:solid 2px #999999;
6.em padding:2px;
7.em margin:23px;