Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: ID and NAME

  1. #1
    New Coder
    Join Date
    Feb 2010
    Location
    Armenia
    Posts
    41
    Thanks
    17
    Thanked 0 Times in 0 Posts

    ID and NAME

    please i want to know is there any difference to give an object both ID and NAME or only one of them????

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    There's no magic behind it, they are simply two different attributes of an element.

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,607
    Thanks
    6
    Thanked 997 Times in 970 Posts
    name being deprecated for every element except form controls (input, select, textarea). So no HTML element should ever get a name attribute again in future (except the ones mentioned). id is the only valid attribute!

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Furthermore, a name can be common for several elements, while an id must be unique on the document.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New Coder
    Join Date
    Feb 2010
    Location
    Armenia
    Posts
    41
    Thanks
    17
    Thanked 0 Times in 0 Posts
    THX veru much


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •