First name:
<input type="text" name="first_name" value="" maxlength="100" />

I want the "First name" to be a certain font size, so what do I insert into my css code?

1 answer

1
point
This was chosen as the best answer

HTML

<label for="fname">First name:</label>
<input id="fname" type="text" name="first_name" value="" maxlength="100" />

CSS:

label {font-size:whatever;}

If you need to set the size of some but not all labels, use a class.

Answered over 6 years ago by Richard Grevers
  • Lol, I just remembered that it said that in a book the second that it said you posted this. lol. Thx. canyonchase1 over 6 years ago
  • And of course you get the accessability benefits of label - click on it and get focus on the input. Richard Grevers over 6 years ago