Both are correct but they don't have the same meaning. The 1980s is one decade (1980 to 1989) while the 1800s is en entire century (1800 to 1899). Even though many grammarians consider it correct to add an apostrophe before a plural s when the s is added to something other than a word, it might be preferable to omit it in your examples.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.