No, it is impossible to match the class and a for together. However, there are things you can do to make sure your id and for are uniquely different from other attributes for id attributes as well.
, for - , id/.
<input type="button" id="harhar_1"/><label for="harhar_1">Im only for Id</label>
<input type="button" id="harhar_2"/><label for="harhar_2">Im only for Id</label>
<input type="button" id="harhar_3"/><label for="harhar_3">Im only for Id</label>
HTML , , .
, , - , CSS :
<input class="harhar" type="button" id="harhar_1"/><label for="harhar_1">Im only for Id</label>
<input class="harhar" type="button" id="harhar_2"/><label for="harhar_2">Im only for Id</label>
<input class="harhar" type="button" id="harhar_3"/><label for="harhar_3">Im only for Id</label>
, CSS DOM .