How can I add an overlay label on table of dynamic images?

I need to add an overlay labels on a table of images, these images are randomly shuffled every time, but there will be always location number on top of each image corners.
How can I add that using HTML?
get a look at a sample: