Open this example in the interactive library
Source code
<style>
.demo:focus-within legend {
font-weight: 700;
text-decoration: underline;
}
</style>
<fieldset class="demo">
<legend>Pickup</legend>
<label>Date <input type="date" /></label>
</fieldset>