Using an image as a link in html

This is the code I use to create a link in html:

Table of Contents

and that is working fine for years.

In case the above was not enough, the image is a top arrow and the link allow the user to go back to the top of the page.

Today, I had the idea to check the generated html file with FireFox (FF), and corrected some glitches in the code (invisibles in the pages but reported by FF).

And I found this reported: with a pink backdrop (meaning an error or deprecation). If I remove the leading #, that remove the pink behavior, but want to load a file named ToC (instead of going to the document top of page, the Table of Contents area where I have a …)

A search on internet leads to nothing.

Ideas ?

You will need to update your post, we can’t see the code you use and after “And I found this reported:” all letters are blue and I don’t know if that is supposed to link to another page.

<tr><td><a name="1963-09-22"><a href="#ToC"><img src="./images/ToC.png" alt="Table of Contents" align=right></a>
The forum software eat the html code. I hope this time it is OK.

Sorry, I do not noticed that.

Here’s what FF renders:

(a different entry, I suppose).

I don’t see any pink background using Firefox and visiting:

image

Do you have the corresponding id="ToC" ?

Note: I don’t know if the id change something.

No, no ID, but <a name="ToC"></a> And that works fine.

Just to know, I added a new h1 with an ID and replaced #TOC with #myID to be inn tune with the shared code above and I get the pink wrning in FF (but the code works too).

I checked MacWorld and Ars Technica (pages with links), but they use different ways… (far more complex).

Is there a setting in FF that I need to change to see this ‘pink warning’?
I can’t find anything about this warning.

Sorry. I load the html page, then cmd-U (or probably Ctrl-U) to display the html source in another tab.

Sorry, did the same, no pink warning here. Firefox 130.0.1, macOS 13.7
Can’t find anything about pink warning Firefox anywhere.

130.0 / Sequoia here.

Pink = warning: my interpretation. On other occurences (different problems), I resolved the trouble, the pink disappeared. (ex: with missing closing tags or misplaced or…).

As you see, text between quotes are displayed ib blue. I suppose that’s the way Firefox talks to the users…

Apparently, I forget to resolve some other troubles, look the screen shot (complete entry):

I have to add an opening set of <tr><td>

I add an orphan </a> and here’s how it looks:

I will check my number of open and close<a ; this may be the explanation…

The problem is having an anchor inside another anchor:

<a name="1963-09-22"><a href="#ToC">

try:

<a name="1963-09-22" href="#ToC">

Did my previous answer helped you? No <a> between another <a>

That’s it ! I was iterating thru all the <a and realized that, checked and yest that is where the error is.

Thank you for the help.

I was particularly tired the day I started that file; then I continued, replicating the error entry after entry…

BTW: time to left

The answer was left in the page since yesterday evening.

You found the error!