How to select “label for=list[]” in CSS?

I have an array of check boxes and jquery validate plugin applies the label with class error like this,

<label for="list[]" class="error">This field is required.</label>

I have checked this answer but when i changed it to label[for=list[]] it didn’t work. How can i select it using css?

Here is the FIDDLE


Use quotes around the value. In this case "list[]".


[for="list[]"]{ color:red; }

For more information, check out the documentation on attribute selectors.