Learn about this topic in these articles:
function in cephalopods
...the eggs are left uncared-for. Squids that attach their eggs to the bottom engulf them in a gelatinous mass that protects them from disease and deters predators. Cuttlefishes squirt their eggs with ink when they are laid to camouflage the otherwise white eggs.
The ink of cephalopods is used for both defense and escape. In Octopus under attack by a moray eel, the cloud of ink seems to paralyze for some time the eel’s senses of sight and smell. In squids the ink is ejected as a spindle-shaped mass about the size of the squid itself, the ink coagulating in the water. With this “dummy” left behind, the squid contracts its...