I know it can be done like the image above but I cant figure out how to make the 1px solid black border stop when it hits the
and skip going through it like in the image above.enter image description here
>Solution :
You can create a visually organized and accessible form using the fieldset element.
The legend element is used to provide a caption for the group of form controls.
<fieldset>
<legend>Gender</legend>
<input type="radio" name="gender" value="male" id="male">
<label for="male">Male</label>
<input type="radio" name="gender" value="female" id="female">
<label for="female">Female</label>
</fieldset>
Experience it yourself by visiting this interactive example:
https://www.tutorialrepublic.com/codelab.php?topic=html&file=fieldset-tag