14 ms·
This is something that's very easy to check in a web browser with DOM - Suppose you have this HTML: <p>hello</p><img src=#> If you try to access the `.alt
by err4nt 8y ago
This is something that's very easy to check in a web browser with DOM - Suppose you have this HTML:
<p>hello</p><img src=#>
If you try to access the `.alt` property of the <p> tag you get `undefined`, and if you try to access the `.alt` property of the <img> tag it returns the empty string in this case because the property exists on that tag, but hasn't been set to anything.