DEV Community

Discussion on: Responsive Contact Form Using Pure HTML and CSS.

Collapse
 
tedk13 profile image
Ted

Nice work! If you want to refine this a bit you could remove the divs and wrap your inputs in the label.

<div class="email">
    <label for="email">E-mail: <span>*</span></label><br>
    <input type="email" name="email" id="email" placeholder="E-mail" required>
</div>
Enter fullscreen mode Exit fullscreen mode

Becomes:

<label class="email">
    E-mail: <span>*</span>
    <input type="email" name="email" id="email" placeholder="E-mail" required>
</label>
Enter fullscreen mode Exit fullscreen mode

Notice if you wrap you input in a label you don't need the for="". What you did is correct just thought I'd share a little knowledge.