The g:form tag supports the attributes name and id.
But name is not XHTML strict compatibel, so it should not be used further.
The id attribute is used to create the submit url of the form. It has nothing to do with the usual css id attribute. But it prevents the usage of it. CSS id can be set only indirectly via the name attribute -> which will break xhtml compatibility.
So currently it is not possible to produce a xhtml strict compatibel form with and id attribute to customize via CSS and use in DOM operations.
Suggestion: rename the "id" attribute to something else like "objectId" or "instanceId" so "id" can be used for CSS / DOM.
The same id-stuff (don't now about xhtml strict compatibility) for other TAGs like: