Interesting difference but why is querySelector(`#${CSS.escape(id)}`) better?<p>I would prefer to use valid id's but also, when selecting by id I just use getElementByID?<p>You could also use querySelectorAll(id) and have more than one element with the same id. It doesn't seem like a good idea.