Added html generation function.