Robert Louis Stevenson started it all in 1883.
Five pirates from books and movies illustrate a shifting approach to buccaneers in popular culture:
Long John Silver: The most memorable of several pirates created by Robert Louis Stevenson in his novel Treasure Island. The book popularized many of the notions we have about pirates, from peglegs to treasure maps and parrots.
Captain Hook: J. M. Barrie's enduring creation is Peter Pan's arch-enemy. His ship is the Jolly Roger. He doesn't like crocodiles so much. Played or voiced on screen by the likes of Dustin Hoffman, Hans Conreid, Jason Isaacs and Danny Kaye.
Captain Blood: An Irish doctor taken as a slave, Peter Blood, makes himself into a pirate in a series of novels by Rafael Sabatini. Errol Flynn's swashbuckling defined the role in a 1935 film directed by Michael Curtiz, who later gave the world Casablanca.
Captain Jack Sparrow: Johnny Depp's swishbuckling is defining another sort of pirate — fey but fierce — in the blockbuster Walt Disney Pictures series Pirates of the Caribbean.
...and let us not forget:
The Dread Pirate Roberts: Long before Depp's Sparrow, Cary Elwes planted his tongue firmly in cheek as the black-clad alter ego of the hero Westley in the 1987 film The Princess Bride, directed by Rob Reiner and based on the novel by William Goldman.