Sharp increases in the costs of gasoline and housing helped drive area consumer prices up another 2 percent during the last two months, despite the first drop in food prices in nearly a year.

The price rise was lower than the 2.2 percent average increase nationally. But it was higher than the 1.6 percent rise recorded in the previous two months.

Prices in the Washington area rose 11.4 percent during the last 12 months, compared to an 11.3 percent increase for the nation over the same period.

One reflection of this was a slower rate of spedning by area shoppers, merchants said.

"People are shopping, yes, but not as much," said a spokesman for Woodward & Lothrop. "People are buying high quality suits and coats for fall because they feel they will last longer. From what we've seen, people are buying because they feel everything will be higher later."

Food prices in the area rose 1.1 percent from May to June, an increase 0.5 percent higher than the national average. But those prices dropped 0.6 percent in July, compared to a national 0.5 percent increase, according to the Department of Labor.

That was the first food price decrease in the Washington area since the two months ending last September when food costs declined by 0.3 percent.

The 0.4 rise in food prices for the two months was caused by increases in the prices of fruits and vegetables and higher prices for both months of cereal, bakery and dairy products. That was offset, however, by a 1.3 percent decline in the prices of meats, poultry, fish and eggs -- particularly beef -- in June and another 1.5 percent drop in July.

"Beef is probably the big seller, but chicken is a good seller, too," said Ernie Moore, spokesman for Safeway Stores. "This area has always been a big beef area. They continue to buy beef. A lot buy on specials, a lot are buying bottom rounds and have them cut up and frozen. They're taking advantage of meat specials."

Department of Agriculture economists said that beef prices have been declining since April because of greater availability of cattle.

"Beef supplies are a little higher and consumer demand is a little soft," said Labor Department economist Lamar Gowland.

Although costs of fruits and vegetables increased 9.7 percent in June, they declined by 0.8 percent in July, Gowland said. Moore said that in the spring the nationwide truckers strike had forced fruit and vegetable prices up and now, "some of the soft fruits from California are down because of a reduction in freight charges."

"The same thing happened nationally," Gowland explained. "We expected some food prices to decline in June because the crops are coming in."

General transportation costs for the two months rose 3.9 percent, mainly because of continued sharp increases in gasoline prices, the Labor Department said. Housing costs rose 2.9 percent, "reflecting higher costs for mortgage interest, electricity, homes, fuel oil, property taxes and maintenance repairs."

However, declines were noted in prices of most large durable goods, particularly stereos and refrigerators.

According to Labor Department figures, items that cost $100 in 1967 in Washington now cost $220.40.

Prices in other areas around the country rose 1.5 percent in Cincinnati, 3.4 percent in San Diego, 2.6 percent in Baltimore, 2.8 percent in Miami and 2.2 percent in Boston, the Labor Department said.