Thanks acrylian,
Just to pursue this further...
I am able to enter the custom html code into the description field and get the output I want. The problem is that if I save changes a second time the code reverts back to the original and I'm back to square one.
Is there any way around this? Perhaps, editing images one at a time instead of in a batch?