Not all blood is red.
Crabs, for instance, have blue blood. It contains copper instead of iron, which makes blood red. The blood of earthworms and leeches is green, thanks to an iron substance called chlorocruorin. Many invertebrates, such as starfish, have clear or yellowish blood.
Whether red, blue, green, or yellow, all blood performs the function of carrying oxygen to body cells. Iron and copper are metals that attract oxygen.
The type of blood system is related to how much oxygen an animal needs. Smaller creatures, such as insects, don’t need much. Their “blood” (called hemolymph) oozes freely between body parts. Earthworms have a main blood vessel to carry blood from one end of the body to the other. Five pairs of “hearts” (really just bulges in the vessels) move the blood along. Larger creatures, such as fish, birds, and mammals, have greater oxygen needs, so they have a bigger pump (a “real” heart) and many tubes to spread blood around their bodies.