I've come across many sites and scripts on how to do a photo gallery. I've found this website (http://www.yervant.com/wedding.htm) and man ... this is one of the style (try clicking on any of the photo and let go the mouse button) that i've been looking for but HECK! it was done in FLASH. I was wondering if anyone saw this kind of photo presentation in CSS/Javascript?
If you're looking for an easy way to post many photos online in your code, I used Photoshop's Web Gallery feature. You have to create your own template and then it does the rest for you. All you do is select the folder with the images in it, push the button and photoshop rezises all images, creates thumbnails, and sticks it all in the template code. I used it for this gallery. Super easy once you set up the template!
However, I definitely wouldn't go so far as to say the HTML output is "incredibly bad". Granted, it uses tables when css could easily be implemented. But it doesn't create malformed tables and they do their job just fine.