Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
front-end-tech:xhtml:id-vs.-name-in-form-fields [Oct 24, 2026 08:33 PM] 145.223.144.96 removed |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | = ID vs. Name in Form Fields = | ||
| - | When creating a form field, you should give them both an '' | ||
| - | <code html> | ||
| - | < | ||
| - | <input type=' | ||
| - | <input type=' | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | This is because browsers use the '' | ||
| - | |||
| - | You should also always name your '' | ||
| - | |||
| - | Conclusion? **Always use both, make them the same string, and make that string unique in the document.** | ||