Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms Form Basics The Button Element

is name attribute very important?

I just have a simple question. Is 'name' attribute very important?

4 Answers

Because later, when your form sends data to the server, it'll be referenced on the server by it's name attribute from the form.

Yes it's very important when working with server side code. For example, when someone types text into an input and you want to do something with that data, you would access that data from the name value in order to do something with it.

hmm thank you.

thank you. since I have no idea about server side, so didn't know about that. I always used to write without name attribute. now onwards i will put name as well.