We have alternate text, alt attribute, for an img tag in HTML, which will show up when the image doesn’t come up. I tried using the tag with iframe too.
<iframe src="www.abc.com" alt="Web site is not avaialable">
But the alternate text doesn’t come up when src="" is given. Just wanted to know if I can achieve alternate text in any other way, if the src is not given ?
Since my first attempt misunderstood your question, let’s try this instead:
This will read the “alt” tag value for any iframe with either no src attribute or a src attribute with a blank value, and write the alt text into the body of that iframe.
Assist from Write elements into a child iframe using Javascript or jQuery