menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Understand...
source image

Self-Learning-Java

1M

read

140

img
dot

Image Credit: Self-Learning-Java

Understanding the name vs id Attributes in HTML input Elements

  • The name attribute is used to specify the key that will be sent when the form is submitted.
  • The id attribute is used to uniquely identify an element in the HTML document.
  • The id must be unique across the page.
  • If you associate an input with a label, the for attribute of the label matches the id of the input, making it easier for users to click on the label to focus on the input.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app