What version of InDesign? How did you create the figure numbers? Number list?
I am using CS5.5
The figure numbers are a numbered list under a paragraph style.
I don't think that's going to work. Number lists are automatically converted to li tags and are wrapped in ol tags for ordered lists. But for those need to stand by themselves in the HTML. On top of that you have the issue of decimals.
I'd convert the numbers to text (there's probably a script floating around to do them all) and then map the captions to a p tag using either a class or if every image has a caption you could use img+p as a css rule.