changing color based on id using CSS and html

I have this html simple code :

<li id="365720">
    <a target="_self" href="">nice</a>

with the id of #365720, how I could change the color of the word nice using CSS?

I tried a couple of things like using the id it self our target the id with id*$^ and still I could not manage to change the color of the word


In HTML 4, id must begin with a letter. (HTML5 does allow this, you can painfully follow this answer if you really want to go that way). A much more practical way would be to use use a data-* attribute instead of id like the following:

[data-id="365720"] a {
  color: red;
<li data-id="365720">
  <a target="_self" href="">nice</a>