Wordpress Themes - Area rugs - Debt Consolidation - Debt Consolidation - Debt Consolidation

PDA

View Full Version : Difference between "name" and "id"


enchance
Oct 8th 2007, 7:00 pm
I have always wondered about this one. I use "id" with CSS and "name" with forms but is that really why these 2 are separate? What is it about them that they had to be separated?

ajsa52
Oct 12th 2007, 12:42 am
I think name was introduced by IE browsers, and id is the W3C standard.
Usually is a good idea to use both on same element, to achieve cross-browser compatible code. Example:
<form name="myform" id="myform">...</form>