DIV tag NAME attribute??

windows

Guest
Does the DIV tag have a NAME attribute? I didn't think it did, but I came across the following piece of code and am not sure of the use of the NAME attribute:<br />
<br />
<DIV id="option1" name = "option1" style="position:absolute; left:20px; top:111px" class="cOptLink"></DIV><!--content-->Correct me if I'm wrong, but I believe that the name attribute and the id attribute are the same - you can access Div properties using either (i.e. you can make a Div visible or hidden).<!--content-->I guess that was essentially my question...are NAME and ID equivalent?? What is the difference?<!--content-->Yes - there is a distinct difference in NAME and ID.<br />
<br />
Sometimes you can use them interchangablely, but 9 out of 10 times this interchangability is used incorrectly - but here is a good reference for getting started when needing to know the diff between ID and NAME.<br />
<br />
Hint: It all has to do with the DOM<br />
<br />
<!-- m --><a class="postlink" href="http://hotwired.lycos.com/webmonkey/98/05/index3a.html?tw=authoring">http://hotwired.lycos.com/webmonkey/98/ ... =authoring</a><!-- m --><!--content-->MY BAD!<!--content-->
 
Back
Top