flatten html