PNG generally does much better transparency than gif. Gif only does binary transparency, while png will do alpha. Binary means pixels must be either fully opaque or fully transparent, which is why gifs with transparency often have jaggy edges. Alpha allows setting variable opacity on pixels, meaning you don't get the jaggy edges.