Why have this difference? Does this mean that name could actually have whatever you want in it as long as every (radio/checkbox) option shares the same name?
I have also seen name and value share similar text, from what I have gathered it seems like name is for grouping things together and value is for giving the data for individual things.
For example:
If I was sending data out that was about favourite types of weather ,the name would be weather and the value would be rain.
Is this correct? Is there more to it? I have asked someone before and they said name and value swap roles depending on what you are doing, is this accurate?
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Yes, its so that you can send data to the backend and know which radio or checkbox is part of a field (like what is the weather, in this case)
Yep you are right
Yes
You will learn more when you start sending data from front-end to back-end.
I think the type= and name= attribute is all that there is to it. Later you will learn about form methods, form actions to send data from html to backend servers.
I don’t think that’s accurate nor have I heard about that.
You can read more about it here
As you can see, data are being sent to server in name/value pairs, like weather: rain, or weather: sunny, not the other way around