Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6851551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:15:43+00:00 2026-05-27T01:15:43+00:00

We have alternate text, alt attribute, for an img tag in HTML, which will

  • 0

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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:15:43+00:00Added an answer on May 27, 2026 at 1:15 am

    Since my first attempt misunderstood your question, let’s try this instead:

    <script>
    $(function () {
    
        $("iframe").not(":has([src])").each(function () {
    
        var ifrm = this;
    
        ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
    
        ifrm.document.open();
        ifrm.document.write($(this).attr("alt"));
        ifrm.document.close();
    
        });
    
    });
    </script>
    

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an asp:Image -- which I'm assigning alt and tooltip from the code
I have such xpath expression : link[@rel='alternate' and @type='text/html' or not(@rel)]/@href | link/text() ?
I have a page which generates a html code in a text box. When
I have this divs in my html <img src=images/cocina1.jpg name = main_img alt=alternate_text height=250
I have a img tag as <img src=http://######/index.php?option=com_payplans&view=cron alt=./> But src is not a
I'm building a web system and various clients will have alternate text for default
I have a feature of my application which depends on alternate-click. Windows users don't
I have a table which has rows that alternate colors, when I hover over
Possible Duplicate: How to extract img src, title and alt from html using php?
I would like to have alternate behavior during a print stylesheet on a web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.