Code it in html with a set of functions which serve to output/format dynamic blocks.