For an ID

The only restrictions on the value of an id are:

  1. it must be unique in the document
  2. it must not contain any space characters
  3. it must contain at least one character

So the value can be all digits, just one digit, just punctuation characters, include special characters, whatever. Just no whitespace.

So these are valid:

<div id="container"> ... </div>
<div id="999"> ... </div>
<div id="#%LV-||"> ... </div>
<div id="____V"> ... </div>
<div id="⌘⌥"> ... </div>
<div id="♥"> ... </div>
<div id="{}"> ... </div>
<div id="©"> ... </div>
<div id="♤₩¤☆€~¥"> ... </div>

This is invalid:

<div id=" "> ... </div>

This is also invalid, when included in the same document:

<div id="results"> ... </div>
<div id="results"> ... </div>

An id value must begin with a letter, which can then be followed only by:

Referring to the first group of examples in the HTML5 section above, only one is valid: