• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS How to properly edit code to remove a broken image link?

aathy

New Coder
I have little coding knowledge, so hopefully this may be a stupid question! I've used Ahrefs to identify a "404 not found" error. It's a broken image linked on about 340 pages of my website, and by inspecting a site page I found that the image link is buried in code for a body banner. I first found its location in the theme files within templates>components>common>body.html, and there saw the path components/halothemes/top-body-banner. Now that I am in top-body-banner.html and can see the link itself, how exactly can I safely edit the code to delete it? Can I delete that entire single line of code (it is the third line below), leaving the banner empty? Can/should I also remove the path as in body.html so there's no banner at all?

Code:
<div id="top-body-banner">
   <div class="container">
      <a href="#placeholder_link"><img src="/product_images/uploaded_images/top-body-banner.jpg" alt=""></a>
   </div>
</div>
 

BGB

King Coder
Staff Team
Guardian
If you don't want to show the image and want to remove it from your page just delete the class container, if there is no other elements in it. If there are other elements in your container class than just delete the a tag that is covering the image.
 
Top