President Obama dons a patriotic hat while visiting with service members at a 2012 Independence Day celebration. (Haraz N. Ghanbari/AP)

President Obama clearly learned a lesson from former Democratic presidential candidate Michael Dukakis’s ill-fated helmet-in-the-tank moment.

On Friday, as he was presenting the Commander in Chief’s Trophy to the Navy football team at a White House ceremony, two of the players handed him a football helmet.

“Put it on,” came a cry from the audience, according to the pool report.

Obama wisely demurred.

“Here’s a general rule,” he declared. “You don’t put stuff on your head if you’re president. That’s politics 101. You never look good wearing something on your head.”

Obama tends not to wear hats (unlike his Stetson-loving predecessor), save for the occasional baseball hat. But we uncovered a few times that he’s strayed from his no-headwear rule.

Mostly, the reason to steer clear is the strong possibility that whatever you plunk on your noggin will look goofy. But sometimes, there’s a more substantive factor at play, such as when Obama nixed a stop at a Sikh temple during a 2010 visit to India, in part because he would have had to wear a head-covering.

Heavy is the head...

Then senator Barack Obama (D-Ill.) put on a cowboy hat handed to him at a campaign rally in Austin in 2007. (LM Otero/AP)