Consumers felt better about the economy in May, probably thanks to a decline in both gas prices and unemployment, according to a University of Florida survey.

As economic prognosticators get more anxious, Floridians feel more optimistic.

Consumer confidence improved across the state this month, the University of Florida reported Tuesday, even as a national survey showed spreading gloom. The difference may lie in how the questions are asked, but also highlight the new sense of iffy-ness surrounding the current recovery.

“The sky isn’t falling. It’s a recovery running into some headwinds,” said Sean Snaith, an economist at the University of Central Florida.

The UF survey came out the same day that the New York-based Conference Board reported a sharp drop in its national survey of consumer confidence. Part of the difference may come from the surveys themselves. UF pollsters ask questions focused on personal finance and economic conditions, while the Conference Board asks about job prospects and business conditions.

A preliminary sampling by UF this month put the confidence index at 77, three points higher than in April and nine points higher than a year ago. Both represent significant increases, and put the index just under the post-recession high of 78 reached in April 2010.

The three-point gain in UF’s confidence index comes after three months of declines. It also coincides with a growing economic crisis in Europe that analysts warn could reverse the rebound under way in the United States.

Investors are becoming more anxious, leading to some ugly days on Wall Street in recent weeks. The Dow Jones stock index see-sawed its way to a 125-point gain Tuesday, even as fears of a banking meltdown in Spain sent cut into the day’s bullishness. Washington also is causing anxiety as economists warn of another recession if mandated spending cuts take effect next year as part of a debt-reduction plan. The cuts only take effect if Congress and the White House can’t work out another solution.

Chris McCarty, head of polling for UF, noted the European and Washington issues probably aren’t yet showing up in the UF survey, but could cause another reversal in confidence if the global news doesn’t improve in the coming weeks and months.

Statewide, the numbers look encouraging. Florida’s unemployment rate is down from 9.4 percent to 8.7 percent in the past six months, and most counties are also seeing employers adding jobs. The Federal Reserve released its state-by-state index of leading economic indicators, and the report showed Florida’s economy was likely to grow by more than 1 percent through October.

The UF questions are the same used by the University of Michigan’s index of national consumer confidence. Unlike its counterpart at the Conference Board, the Michigan survey showed confidence at a five-year high in May. Spending questions can make the UF survey and Michigan surveys more sensitive to gas prices, which have been falling in recent months.

“I understand why people are feeling better off,” survey director Chris McCarty said. “Gas plays into it a lot.” Regular gasoline costs about 3.47 cents a gallon in Florida, 33 cents less than it did a month ago, according to AAA.