CrazyEngineers
  • use of <img> in html

    Updated: Oct 22, 2024
    Views: 1.2K
    I have tried coding in html using <img> with thier required attributes but when i run that code on a browser it does not display my image.the same problem is experienced by many of my classmates those who are using higher IE versions. HELP.
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Techie Earthling

    MemberFeb 2, 2013

    Verify the EXACT name of your file. Case Matters in HTML/The Web... and only some MS servers will let you get away with the wrong case. Other than that, if the image is in the same directory as your page, this should work.

    Download attached file and extract it ! then open folder and double click on the html file ! its working on all the IE version, Chrome, Firefox, Opera And Safari.

    Hope it will help !

    Regards,
    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberFeb 2, 2013

    shailaja revathi
    I have tried coding in html using <img> with thier required attributes but when i run that code on a browser it does not display my image.the same problem is experienced by many of my classmates those who are using higher IE versions. HELP.
    Check out this link and ensure that you are doing everything right:
    <a href="https://www.w3schools.com/tags/tag_img.asp" target="_blank" rel="nofollow noopener noreferrer">HTML img tag</a>
    Good Luck!!
    Are you sure? This action cannot be undone.
    Cancel
  • Shailaja Tiwari

    MemberFeb 2, 2013

    THANKS .it's working fine for the image in the same directory but not for the images in other files outside the directory.and another query that i have is that IE is not displaying appropriate bgcolors/textcolors/hr-color.it is showing red for blue and green for red for other colors such as yellow/orangeetc.it is displaying as black.could u please explain why is it happenning so?
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberFeb 2, 2013

    shailaja revathi
    THANKS .it's working fine for the image in the same directory but not for the images in other files outside the directory.and another query that i have is that IE is not displaying appropriate bgcolors/textcolors/hr-color.it is showing red for blue and green for red for other colors such as yellow/orangeetc.it is displaying as black.could u please explain why is it happenning so?
    Well that is unusual. Could u post the code which is giving such responses? It would be better to get to the root problem.
    Are you sure? This action cannot be undone.
    Cancel
  • Shailaja Tiwari

    MemberFeb 2, 2013

    rahul69
    Well that is unusual. Could u post the code which is giving such responses? It would be better to get to the root problem.
    HERE'S MY CODE :
    <HTML>
    <body bgcolor="aqua" >
    hello world .
    protect and love animals and plants.
    <hr color="green" width=550 >
    <hr color="red" width=550 >
    </body>
    </HTML>
    This problem is only with IE and not with other browers as mozilla and chrome.

    and what about the image part?The link that you have provided above is known to me and it does not provide any solution to my problem with <img> elements.
    THANKS for your effort about this matter.
    Are you sure? This action cannot be undone.
    Cancel
  • [Prototype]

    MemberFeb 2, 2013

    shailaja revathi
    HERE'S MY CODE :
    <HTML>
    <body bgcolor="aqua" >
    hello world .
    protect and love animals and plants.
    <hr color="green" width=550 >
    <hr color="red" width=550 >
    </body>
    </HTML>
    This problem is only with IE and not with other browers as mozilla and chrome.

    and what about the image part?The link that you have provided above is known to me and it does not provide any solution to my problem with <img> elements.
    THANKS for your effort about this matter.
    Which version of IE you're using? That thing works good on IE 9.
    Are you sure? This action cannot be undone.
    Cancel
  • Shailaja Tiwari

    MemberFeb 2, 2013

    [Prototype]
    Which version of IE you're using? That thing works good on IE 9.
    I am using IE6
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberFeb 2, 2013

    shailaja revathi
    HERE'S MY CODE :
    <HTML>
    <body bgcolor="aqua" >
    hello world .
    protect and love animals and plants.
    <hr color="green" width=550 >
    <hr color="red" width=550 >
    </body>
    </HTML>
    This problem is only with IE and not with other browers as mozilla and chrome.

    and what about the image part?The link that you have provided above is known to me and it does not provide any solution to my problem with <img> elements.
    THANKS for your effort about this matter.
    This code works well in IE8 too, maybe the problem lies in your browser settings.
    Check that in Tools->Internet Options->General->Colors it should have Use Windows Colors as checked.
    Also see that in Tools->Internet Options->General->Accessibility all the boxes are unchecked
    And regarding the image part,older version of IE seems to only recognize image with its original format. For example if your image was originally in bmp format, u changed its extension to gif and then wrote src as gif , then it will not recognize your image. The solution is to again rename the extension to bmp and wrote src as bmp, then it will work. So it is better to use some other browser, or get the new version of IE. Hope it helps.😀
    Good Luck!!
    Are you sure? This action cannot be undone.
    Cancel
  • Shailaja Tiwari

    MemberFeb 2, 2013

    rahul69
    This code works well in IE8 too, maybe the problem lies in your browser settings.
    Check that in Tools->Internet Options->General->Colors it should have Use Windows Colors as checked.
    Also see that in Tools->Internet Options->General->Accessibility all the boxes are unchecked
    And regarding the image part,older version of IE seems to only recognize image with its original format. For example if your image was originally in bmp format, u changed its extension to gif and then wrote src as gif , then it will not recognize your image. The solution is to again rename the extension to bmp and wrote src as bmp, then it will work. So it is better to use some other browser, or get the new version of IE. Hope it helps.😀
    Good Luck!!
    HEY thanks ,in IE //* ignore colors *// was checked.Rectified it and now getting the right color.
    and for image here's my code and i'm still not getting it.

    <html>
    <body>
    this is an image example.
    <figure>[​IMG]<figcaption>
    fig.1 a view of an image</figure>
    </body>
    </html>
    Are you sure? This action cannot be undone.
    Cancel
  • Techie Earthling

    MemberFeb 2, 2013

    shailaja revathi
    HEY thanks ,in IE //* ignore colors *// was checked.Rectified it and now getting the right color.
    and for image here's my code and i'm still not getting it.

    <html>
    <body>
    this is an image example.
    <figure>[​IMG]<figcaption>
    fig.1 a view of an image</figure>
    </body>
    </html>

    try using [​IMG]
    Are you sure? This action cannot be undone.
    Cancel
  • Shailaja Tiwari

    MemberFeb 2, 2013

    Techie Earthling
    try using [​IMG]
    yes , i got it ;but only in chrome mozilla is still not suppporting.anyway,it does'nt matter for mozilla .THANK YOU VERY MUCH .😀
    Are you sure? This action cannot be undone.
    Cancel
  • Techie Earthling

    MemberFeb 2, 2013

    shailaja revathi
    yes , i got it ;but only in chrome mozilla is still not suppporting.anyway,it does'nt matter for mozilla .THANK YOU VERY MUCH .😀
    Any Time Dear Friend CEans are always ready to help you 😀

    and I request Moderators (@#-Link-Snipped-#) to mark this Discussion as solved !😀
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberFeb 3, 2013

    shailaja revathi
    yes , i got it ;but only in chrome mozilla is still not suppporting.anyway,it does'nt matter for mozilla .THANK YOU VERY MUCH .😀
    For Mozilla u can use <img src="file:///C:/User/User/Desktop/Downloads/images/th (3).jpg"> .This should work in all i think.. 😀.
    Are you sure? This action cannot be undone.
    Cancel
  • Shailaja Tiwari

    MemberFeb 3, 2013

    rahul69
    For Mozilla u can use <img src="file:///C:/User/User/Desktop/Downloads/images/th (3).jpg"> .This should work in all i think.. 😀.
    NO it is'nt working still.i'm just leaving it and happy with chrome.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register