What are valid values for the id attribute in HTML? When creating the id attributes for HTML elements, what rules are there for the value? Answer: For HTML 4, the answer is technically:       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 ("."). HTML 5 is even more permissive, saying only that an id must contain at least one character