Jump to content

id & name


smiles

Recommended Posts

I see somecode like this :
<input type="submit" value="submit" id="submit" name="submit">

tell me the difference between ID and NAME ???  :) Thanks !

as far as i know "name" is being deprecated to be replaced by "id".

That's right. The ID tag is the "new" thing. However old browsers don't recognize the ID attribute, so it's not a bad thing to place both ID and NAME in elements if you're aiming for maximum accessibility.
Link to comment
Share on other sites

I see somecode like this :
<input type="submit" value="submit" id="submit" name="submit">

tell me the difference between ID and NAME ???  :) Thanks !

"ID" is the XHTML replcement for name... i think it's called depracation or something. You will want to use both the Name and Id attribute until XHTML has fully replaced HTML, so that older browsers will be able to handle it.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...