Iodine was discovered in 1811 by accident by Bernard Courtois. He had a factory that produced saltpeter (potassium nitrate), which was a key ingredient in ammunition. He had figured out how to fatten his profits and get his saltpeter potassium for next to nothing by getting it from the seaweed that washed up daily on the shores. Iodine is plentiful in saltwater and concentrated in seaweed. All he had to do was collect it, burn it, and extract the potassium from the ashes.
One day, while his workers were cleaning the tanks used for extracting potassium, they accidentally used a stronger acid than usual and mysterious clouds billowed from the tank. When the smoke cleared, he noticed dark crystals on all the surfaces that had come into contact with the fumes.
When he had the crystals analyzed, they turned out to be a previously unknown element, which he named iodine, after the Greek word for “violet.” It was soon discovered that goiters, enlargements of the thyroid gland, were caused by a lack of iodine in the diet. That's why iodine is now added to table salt and goiters are mostly a thing of the past.