Saroj Thapa Saroj Thapa - 10 days ago 4x
HTML Question

Why does PHPStorm report that padding isn't allowed on a span element?

I have the following html code. The PHPStorm says attribute padding is not allowed here. How can I quickly fix this?

<span style="padding:10px 0;"></span>


Padding works on inline-block and block level elements

or rather use a stylesheet:

  display: inline-block;
  padding: 10px 0;
  background: navajowhite;
<span class="padded">I have a class!</span>