My HTML code is as follows:
<label class="my-class" for="_something">Text Number 1</label>
<label class="my-class" for="_something">Number 2 Text</label>
I have two labels with the same class and identical "for" attributes.
I am aware that I can target the attribute using this CSS rule:
label[for="_something"] {
/* input */
}
But how can I distinguish between the two?
I specifically need to hide the second label using CSS.
Is it possible to target the attribute based on the text content like "Number 2 Text" in this case?