html attribute that when clicking on the text the checkbox option is selected

Asked

Viewed 68 times

-3

Good afternoon, I wonder if there is any attribute in HTML that the user click on the text of the option in checkbox, the field is selected, not needing to click well inside that small square. I know you can do with the label, but outside the label there is another option? only in HTML without javascript?

  • 1

    Good afternoon! Why can’t it be with label?

  • There is no attribute for this because using the label is the solution defined in the HTML specification.

  • You know you can have more than one label for the same button right? If the label was made for this eh Pq it should be used and there is no other option than the label for this

1 answer

-2


  • I do not know why it was put as a negative point. Impressive we tried to help. We invested time in it and someone comes and negative your answer.

  • 1

    Friend it was not I who gave you Egative, but apparently they gave you -1 because you did not answer what the author asked, in fact it seems to me that you didn’t even read the question until the end before answering... See that in the question this so " I know you can do with the label, but outside the label there is another option? only in HTML without javascript?" I think this makes it clear your -1

  • I read yes I just thought it would be good to put the shapes I know with the label. I really shouldn’t have responded.

  • 3

    If he made it clear that he does not want to label what is the point of responding by talking about the label? He tbm says he does not want to with js, qq one who answer with JS will probably tbm will take a -1, his answer does not make sense to that question, maybe you can use at another time

  • Nice to get a positive here. The stackoverflow here in Brazil has so many people with thousands of points trying to make everything so perfect for them that they end up inhibiting the community. The administrators always negatively negatively letting anyone risk anything that gets boring to do something. Thank you and congratulations.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.