I realize that it is used to designate the names of form fields when it comes time for submission to a server.  But what about in the context of frames and forms' @targets?
Can someone give an explanation of what the deal is with the following pattern?
Edit: I'm familiar with the pattern, have used it before, and know what it does, so I'm kind of looking for a more in-depth explanation of what other contexts the attribute can be used in, and how those contexts relate to each other.
<form target=foo></form
...and then...
<iframe name=foo />
Oh!, and also, is it considered bad practice to use it outside of identifying form fields to the server? I've heard some place that I can't remember that it's deprecated for use in some contexts.
Thanks.
                        
There is no deeper explanation to how some attribute is used for different elements, beyond its definition for each element. If element
foohas attributezapand elementbarhas attributezap, then these attributes share just the name, unless of course they are defined to have the same meaning. The attributes may have completely different meanings and they may take completely different values; it all depends on their definitions.In practice, the designers of HTML tried to be somewhat consistent here, so that the name of an attribute reflects its meaning. For example, the
alignattribute has partly the same meaning for different elements (e.g.,alignforh1means the same asalignforh2), partly similar meanings (e.g.,alignforh1is similar toalignfortable, but not the same). But e.g.typeattribute forolhas really nothing to do withtypeforscript.The index of attributes in the HTML 4.01 spec gives an overview of such issues. There you can also see the
nameattributes for different elements summarized.In HTML 4.01,
namehas been declared forapplet, but only because the element itself has been deprecated. But forformanda, the prose of the spec says: “Note. This attribute has been included for backwards compatibility. Applications should use the id attribute to identify elements.” This, or similar statements, have often been misunderstood as applying tonameelements in general; that would be all wrong, and even absurd.The
nameattribute is needed for form field elements so that they will contribute to the form data, as the contributions are based on his attribute (and the value of the element). It is also essential in one of the two types of themetaelement as well as in theiframeelement, if you wish to specify such an element as a “browsing context” to be referred to in atargetattribute.