This visually suggests how to generate the Sierpinski triangle. The main goal of this page is provide clean Javascript (no libraries) and CSS code to that produces these graphics... I use the same code for the triangles and squares with a little CSS trickery to with transparent border-top and -left and a skew and scale to make the triangles equilateral. Check out this pages code for details. In case you don't have development tools, check out sierp.txt