<label>
<input type="email" placeholder=" " name="email">
<p>Email</p>
</label>
<span class="field-error">error.required</span>
label {
display: block;
}
label:has(+ .field-error) {
border: 2px solid red;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.