Extracted Iterator wrapper for loop items and added attributes helper
for conveniently setting multiple attributes on a wrapping element.