html - Showing required fields by bolding -


i have html form. show of fields required making them bold. in principle, should go css rather html? how it?

<form action="doit" id="doit" method="post">     <label>         name         <input id="name" name="name" type="text" />     </label>     <label>         phone number         <input id="phone" name="phone" type="text" />     </label>     <label>         year         <input id="year" name="year" type="text" />     </label> </form> 

just of top of head, think if you're willing use html5 , use <input type="text" name="year" required> property, should able do:

input:required{    font-weight:bold; } 

and of course, go wild here , start throwing around borders , sorts of stuff make stand out.


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -