How to find out which template the HTML content comes from?

You can use the plugin Debug Objects, this have a option to get outside the templates, folder, file etc. and much more. Makes easier to debug a installed site.