Re: HTML id attribute and arrays

From: Date: Sun, 19 Dec 2010 17:24:45 +0000
Subject: Re: HTML id attribute and arrays
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-310147@lists.php.net to get a copy of this message
On Sun, Dec 19, 2010 at 4:57 PM, Martin C <mumu@seznam.cz> wrote: >> The "name" and "id" attributes do not have to be the same. > > Thank you, I thought it should be the same (for same reason, maybe > compatibility between XHTML and HTML). But could not find anything on the > net which states this. So my memories might be corrupted :) You're probably thinking of: http://www.w3.org/TR/html401/struct/links.html#h-12.2.3 "The id and name attributes share the same name space. This means that they cannot both define an anchor with the same name in the same document. It is permissible to use both attributes to specify an element's unique identifier for the following elements: A, APPLET, FORM, FRAME, IFRAME, IMG, and MAP. When both attributes are used on a single element, their values must be identical." Confusing, the "name" attribute on a form field ("input", "textarea", "select", etc) is different to the "name" attribute on a "a" or "form" element, so this rule does not apply to it. -- Benjamin Hawkes-Lewis

« previous php.general (#310147) next »