All the th:each examples that I have seen works only with one html element at a time. How do I repeat for
a group of statements like above?. In the JSP/Freemarker world, I put the for loop outside these 10 lines.
One solution is similar to the Freemarker example you brought up, which is to put the loop outside those 10 lines. Since the loop has to go in an element, you can add a th:remove="tag" to that element so it will be removed after the loop has been processed: