Edit in JSFiddle
Result
HTML
CSS
<h2 title="hogehoge">ヒットする<h2> <h2 title="piyopiyo">ヒットしない<h2>
h2[title="hogehoge"] { color : red; }