Search code examples
htmlcssfontscolors

how to put all labels in bold with css


how do I make all labels such as : first name, last name, etc in bold, by using header only? thank you

 <form>
                <fieldset class="set1">
                    <legend class="set1">Music Lover's Personal information</legend>
                    First Name
                    <input type="text" name="firstname" value=""><br><br>
                    Family Name
                    <input type="text" name="lastname" value=""><br><br>
                    Gender:
                    <input type="radio" name="gender" value="Female">Female
                    <input type="radio" name="gender" value="male">Male<br><br>
                    What age category are you from?

Solution

  • I would wrap each label in a label tag and then in CSS, with this code, you can get it:

    form label {font-weight:bold}
    

    Hope this helps you.