This post will discuss how to select an HTML radio button by clicking on its text.

The idea is to associate an HTML <label> element with its corresponding radio button. We can do this by providing the radio’s ID attribute value in the for attribute of the <label> element. Now, you can click the associated label to select the corresponding radio button.

The following example demonstrates this:

Edit in JSFiddle

 
If your radio button doesn’t have an id attribute, you can wrap the radio button directly inside the <label> element. Now, for and id attributes are not required since the association is implicit.

Edit in JSFiddle

That’s all about selecting an HTML radio button by clicking on its text.