Look a little closer
The ocean is salty mainly because ions released from rocks on land have been carried to it over immense spans of time. Rain and flowing water gradually weather minerals, while reactions at the seafloor add and exchange other ingredients.
Rainwater becomes mildly acidic after taking up carbon dioxide from the air and soil. As it moves through rock, chemical weathering releases elements as charged ions. Streams and rivers then deliver some of those dissolved materials to the sea.
Sodium and chloride are the two most abundant ions in seawater. Together they are the components of table salt, but seawater also contains magnesium, sulfate and many other ions. Average ocean salinity is about 35 parts per thousand, roughly 3.5 percent by mass.
The seafloor contributes as well. Seawater enters cracks, reacts with hot rock and returns through hydrothermal vents after exchanging chemicals with the crust. Underwater volcanic activity and buried salt deposits can also influence ocean chemistry.
The ocean is not simply becoming saltier at an unchanged rate. Organisms use some ions, while other ions become locked into sediments or newly formed minerals. Over long timescales, inputs and removals are thought to be broadly balanced in the modern ocean.
Evaporation sends water molecules into the atmosphere while leaving nearly all dissolved salts behind, so it can raise salinity in a region. Heavy rain, rivers and melting ice can lower it. The ocean's taste is the combined result of rock weathering, the water cycle, seafloor chemistry and evaporation.



