Why would they call a bottle's stopper a cap? What's the origin of the word?

Native speaker’s answer
Rebecca
The origin of the phrase "bottle cap" is difficult to trace, but the term has been in use since the early 1800s at least. "Cap" has generally been used to refer to the top coverings of containers and objects since at least the Middle Ages, colloquially. The term "bottle cap" became more popular than "bottle stopper" shortly after the invention of the modern metal bottle cap that uses metal teeth to keep the cap on the bottle. "Bottle cap" is roughly ten times more popular as a term than "bottle stopper" today. The term "bottle cap" is so commonly used that some people are starting to spell it as a single word "bottlecap", but this is not currently a popular way to use it. Ex: I don't have a bottle opener, can you help me get the bottle cap off this beer? Ex: Some people enjoy collecting bottlecaps.