In my form, I have multiple label and inputs. I want to change the text color of the particular label in input next to it is focused.
My form html code is below:
<div class="form">
<label class="label">Basic Details<br>
<table class="form-table">
<tr>
<td><label class="form-label">Name:</label></td>
<td><input type="text" name="name" placeholder="Name" required></td>
</tr>
<tr>
<td><label>Email:</label></td>
<td><input type="email" name="email" placeholder="Email" required></td>
</tr>
<tr>
<td><label>Phone number:</label></td>
<td><input type="phone" name="phone" placeholder="Phone number"required></td>
</tr>
</table>
</div>
I want to change the color of Name label when I focus on the name input next to it.