Question about radio buttons

I’m just wondering why the radio buttons use the <input> tag instead of using the <button> tag.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/create-a-set-of-radio-buttons

Because beyond the visual similarity they’re not buttons, they’re inputs (binary true/false input). A button is just a generic thing you press. An input is a specific thing in HTML that is used in forms.

2 Likes

I agree with @DanCouper.
The radio button is used for inputting information while a basic button would be for submitting information submitted through a form.

1 Like

thanks!! that makes a lot of sense.