Is alt the same as alt = ""?

I am adding attributes alt

to all of my images to improve SEO / screen performance.

As a best practice, images that are purely aesthetic should have an empty alt attribute alt=""

for screen readers to skip over. I am at WordPress and noticed that it adds alt

to those spineless aesthetic images, but not alt=""

.

Does alt

it work out the same way as it does alt=""

with screen readers and crawlers, or do I have to log in and force-install programmatically alt=""

?

+3


source to share


1 answer


Yes, it's the same: https://www.w3.org/TR/html5/syntax.html#attributes-0

Syntax empty attributes

Just the name of the attribute. The value is implicitly an empty string.



To me this means that an attribute with no value is the same as the value of an empty string.

This answer says the same thing.

+5


source







All Articles