You need to use template columns and joined lists to generate your HTML.
If you can understand English, here is a tutorial: