0

In HTML,what code do I write as a selection option with the circle dot looking feature?

Ya know, say if I wanted to craft a question and my user has to select the right answer. I have no idea what code that look like a circle and the user selects it. Does involve using the input tag and type attribute? Hope anyone knows what I'm refering to. Por favor y gracías!

22nd Jul 2017, 2:45 PM
Victoria
Victoria - avatar
4 Antworten
+ 4
I'm only halfway through the HTML course at this point, but I still remember! c: type="radio" is what you are looking for.
22nd Jul 2017, 2:51 PM
Mr.E
Mr.E - avatar
+ 4
<input type="radio" name="myradiogroup" id="myrad1"><label for="myrad1">answer 1</label> <input type="radio" name="myradiogroup" id="myrad2"><label for="myrad2">answer 2</label> <input type="radio" name="myradiogroup" id="myrad3"><label for="myrad3">answer 3</label> As answered by @Mr.E, you need the 'type="radio"', but also to set same 'name' value to the group of radio button you want to works as switch behaviour (only one selected, select one unselect others)... <label> and 'for' attributes are useful to make the text related to radio button clickable as well as the button itself ;) In case of submit data inside a form, and/or to handle them with JS, you can use 'value' attribute to identify each option ^^
22nd Jul 2017, 2:59 PM
visph
visph - avatar
+ 1
<input type="radio"> Thank you!
22nd Jul 2017, 2:53 PM
Victoria
Victoria - avatar
0
Massive answer! I will learn this even more of my knowledge when I get to CSS and JavaScript thank you as well!
22nd Jul 2017, 3:08 PM
Victoria
Victoria - avatar