Actually I'd use SVG for that, it's even trivial to write:
<svg width='20' height='10'>
<path fill='#D94948' d='M0,20h20L10,0'/>
</svg>
Should be supported pretty much everywhere canvas is, but without the need of scripting to actually get a triangle.