Because it is an animal product, gelatin is not suitable for vegans or vegetarians. When cooking or baking, it can sometimes be difficult to find a replacement that faithfully recreates the thickness and texture.
Gelatin and pectin are both gelling agents used in food preparation. Gelatin is made from collagen derived from animal bones and tissues. Pectin is a naturally occurring thickening agent found in fruit, particularly apples and citrus fruits.
Both agents are used in cooking. Gelatin dissolves in water and is used in desserts like gelatin, pudding and mousse to provide thickness and stability. Pectin requires sugar and acid to gel properly and is typically only used in jams and jellies where these occur naturally in the fruit.
Pectin can be used as a gelatin substitute, but is not generally recommended due to the acid and sugar required for proper gelling. It can be tricky to get the right flavour and texture. The Vegetarian Society suggests agar or carageenan, both of which are derived from seaweed. Like gelatin, they are flavourless and only require water to work. They also are considered easier to use.