added :class option to HTML generate-xxx functions