Why doesn't the label outside of shape?

All welcome, I need to develop HTML page.
I have 3 radio buttons, if I press button 1, I have inside a form is displayed that you select 1, the same thing works if I select button 2, but if I click on button 3, I have information not appear that I have been selected 3, how to do to show that I chose the 3rd option that is outside of the form and not in form??
 <legend>Select option</legend> 
 <input type = "radio" name = "query" id="r-1" value = "query_1" onclick="foo(this)">Option 1
<br / >
 <input type = "radio" name = "query" id="r-2" value = "query_2" onclick="foo(this)">Option 2
<br / >
 <input type = "radio" name = "query" id="r-3" value = "query_3" onclick="foo(this)">Option 3
<label for="r-1" class="label l-1">Option 1 was selected</label>
<label for="r-2" class="label l-2">Option 2 was chosen</label>
 <label for="r-3" class="label l-3">Option 3 selected</label>
March 19th 20 at 08:34
3 answers
March 19th 20 at 08:36
Because elemetry shape is a group that is physically located inside the form tag. Put 3-rd label is similar to the previous two, and for the removal display the result visually, do the following in css:

.label.l-3 {
display: inline-block;
position: absolute;
top: 75px;
right: 0px;
left: 0px:

For point positioning, pick up the values top, right or top, left exactly in your case. This way you will remove the element from the normal flow and position it where your heart pleases!)
March 19th 20 at 08:38
Everything works
The only error which is in the first line is not closed tag (but hardly a problem)
Write specifically what is not working.

Others don't listen, they are about the stupidity of the specifications. Specification (1, 2) are not prohibited to associate with the form and place the label anywhere on the page. They are even appropriate attribute (form) from a label removed from the specification unnecessary.
Labels are not themselves directly associated with forms. They are only indirectly associated with forms through the controls with which they're associated.

The for attribute may be specified to indicate a form control with which the caption is to be associated. If the attribute is specified, the attribute''s value must be the ID of a labelable element in the same Document as the label element.
March 19th 20 at 08:40
Tag label establishes a connection with the form elements, as he will return to form if he's not inside it? Specification this tag only works inside the form.
Specification this tag works anywhere. - Annabelle.Jacobson24 commented on March 19th 20 at 08:43

Find more questions by tags HTML