In 2009, Joyce Appleby’s “American Journey” said of the missile crisis: “While it seemed like a victory at the time, it left a Communist government intact just miles from the U.S. coastline. The humiliation of giving in also prompted the Soviets to begin the largest peacetime military buildup in history.”

There are a variety of reasons for the shift. First of all, the dazzle of the handsome young president and the assassination in Dallas elevated Kennedy to a heroic level impossible to maintain.

Another is that new writers and editors added different perspectives. In particular, the Vietnam generation began writing and editing, and Kennedy’s role in the war began to matter more. Also, his extramarital affairs became known, providing fodder for criticism. And the release of White House tapes, beginning in 1984, showed a coldly pragmatic politician, not the idealist on issues like civil rights whom people had heard about or imagined.

Finally, the ‘80s saw a shift in textbook historiography. Gilbert Sewall, the director of the American Textbook Council, a nonprofit organization that reviews educational materials, said the older approach concentrated on successes in American history. In the ‘80s, he said, that was replaced by a “revisionist” approach that not only focused on injustices like the mistreatment of Indians but also highlighted flaws of those previously treated as heroic, like slaveholding among the founding fathers. “The Norton book brought this revisionism into a bright light,” he said.

Thomas Thurston, who works with high school history teachers as education director at Yale University’s Gilder Lehrman Center, said the goal of teaching history has always been to make good citizens. But now, he said, by pointing out the nation’s failings, authors send the message that “we need to live up to our founding documents.”

That change, enhanced by unflattering portrayals in journalism, books and television, may have made a big difference in perceptions of Kennedy. Gallup polls used to show the public ranking him as one of the greatest American presidents, sometimes topping Abraham Lincoln for first place as the choice of more than 20 percent.

His standing has declined in recent years. A recent New York Times poll ranked him fourth, at 10 percent. That placed him behind Ronald Reagan, Lincoln and Bill Clinton. His greatest support comes from those ages 43 to 63, who were children or were not yet born when he was murdered and whose high school years for some ran into the ‘80s.