There seems to be a debate on the best way to code a radio input layout. Some sites use the following structure:
<label>
<input type="radio" name="myRadioBtn">
<span>Check me!</span> <!-- With span -->
<div class="custom-radio"></div>
</label>
Others prefer a simpler approach, like this:
<label>
<input type="radio" name="myRadioBtn"> Check me! <!-- Without span -->
<div class="custom-radio"></div>
</label>
It raises the question: Does wrapping the input label text in a span
tag offer any benefits? Does it make styling or JavaScript/jQuery manipulation easier?