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 trialPratik Rai
6,856 Pointsis name attribute very important?
I just have a simple question. Is 'name' attribute very important?
4 Answers
Kevin Korte
28,149 PointsBecause later, when your form sends data to the server, it'll be referenced on the server by it's name attribute from the form.
Daniel Botta
17,956 PointsYes 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.
Pratik Rai
6,856 Pointshmm thank you.
Pratik Rai
6,856 Pointsthank 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.