The water of the sea contains bromides, chlorides, and iodides of sodium, magnesium, potassium and calcium, but mainly solution of sodium chloride (2.5% by mass). The deposits of dried up seas have these compounds in it, e.g., sodium chloride and carnallite, KCl.MgCl2 .6H2O. iodine is also formed in Certain forms of marine life in their systems; many seaweeds, for example, contain up to 0.5% of iodine. Chile saltpeter contains up to 0.2% of sodium iodate. That's why the sea is the greatest source of halogens.