What characters are allowed in DOM IDs?

Posted by Rohit Kumar | Updated on

The ID attribute in HTML tags has a limited set of allowable characters and a web page will not validate if invalid characters are used. Actually there is a difference between HTML and XHTML. As XHTML is XML the rules for XML IDs apply:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers