= HTML / XHTML Best Practices = === HTML vs. XHTML === There are pros and cons to both [[HTML vs. XHTML|HTML and XHTML]]. == ID vs. Name in Form Fields == When creating form fields, you need to give them both a ''name'' attribute and an ''id'' attribute (which should be the same. Then only use the ''id'' for referencing them, using ''document.getElementById()''. More on [[ID vs. Name in Form Fields]] == Use