http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2
The id attribute assigns a unique identifier to an element (which may be verified by an SGML parser).
and
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
So "id" must be unique and can't contain a space.