0

I was looking in a projects source code and found something like this,

input[disabled] {
  /* ... */
}

Note: it works

Instead of,

input:disabled {
  /* ... */
}

But,

  • why [disabled] attribute selector instead of :disabled pseudo selector ?
  • Whats the benefit of using either one ?

thanks in advance :)

ezio4df
  • 3,541
  • 6
  • 16
  • 31

0 Answers0