 <p>Html attributes are strings. The problem likely arises with how the css interpreter interprets an unquoted number. It would recognize it as a number and not a string, so it could never match a string value of an html attribute. </p> <p>You the would need to enclose the value you are searching for in quotation marks so that it is correctly interpreted as a string, as has been previously suggested. If the value starts with a non-numeric character, it would be tokenized as a string, which is why the first example works.</p> <p><a href="http://www.w3.org/TR/CSS2/selector.html#attribute-selectors" rel="nofollow">http://www.w3.org/TR/CSS2/selector.html#attribute-selectors</a></p>