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
Post a Comment