I was taking a look at the W3Schools tutorial, where I'm teaching you how to use% type% input
in Bootstrap.
According to one of the examples, I saw the following code:
<div class="checkbox">
<label><input type="checkbox" value="">Option 1</label>
</div>
<div class="checkbox">
<label><input type="checkbox" value="">Option 2</label>
</div>
<div class="checkbox disabled">
<label><input type="checkbox" value="" disabled>Option 3</label>
</div>
I had never used checkbox
with some label
inside, because I thought it more logical to use input
to identify what label
does, side by side. But now that I've seen in W3Schools and the Bootstrap site itself teaches you to do so by putting input
inside input
.
So far I've only seen this example with label
, but I have some doubts
My question is:
-
Would not that be incorrect? So does this sound like putting
checkbox
inside ainput
? -
Can any
h1
be placed within ainput
? Or justlabel
? Or is this fashion invention of Bootstrap? -
If this is valid, is it valid only for HTML 5, or for other versions, according to W3c?
> bootstrap since the question is not about this subject, it is just a quote