Question: what is the difference between margarine and butter when baking?
Answer: For cakes, cookies, and pastries, butter (unsalted, that is) provides richer flavor. (It begins as cream, after all, and margarine is made from vegetable oil.) ... Margarine, which can contain more water and less fat, may make thin cookies that spread out while baking (and may burn).