Anti-aliasing makes an object appear smoother by blending the color of the object into the canvas color. For example, if the object is black, and the canvas is white, anti-aliasing adds several shades of gray to the pixels surrounding the object's border to make a smooth transition between the black and white.
To prevent halos, make your canvas color match the background of the target Web page, anti-alias the object to the canvas, and then make the canvas transparent.
If you want to anti-alias a graphic for multiple exports with different colored backgrounds, use the Matte pop-up menu in the Optimize panel. This is useful if the graphic will appear on Web pages with different colored backgrounds.
To change the anti-alias colors to match the target background color:
In the Optimize panel, select a color from the Matte pop-up menu. Try to match it as closely as possible to the color in the target Web page's background color.