Environmental advocates held a news conference at Portland City Hall on Thursday to celebrate new city ordinances that will ban plastic foam food and drink containers and charge grocery store customers a nickel for each single-use, carryout bag they use.

Both ordinances, which take effect Wednesday, are intended to reduce the amount of plastic that ends up in waterways, vegetation and landfills.

“People think plastic bags are free, but there is a real cost to the environment,” said Sarah Lakeman of the Natural Resources Council of Maine. “We’re excited to see polystyrene foam go away, too.”

One ordinance would require grocery and convenience stores that generate more than 2 percent of their revenue from food products to charge customers 5 cents for each paper or plastic bag they take from the check-out line. Stores are required to itemize the bag fee on their receipts and post signs informing customers of the fee, which is retained by the store.

The other ordinance will ban the use of polystyrene food and beverage containers in the city.

Several other communities are also considering bag fees, according to the resource council: York, Falmouth, Freeport, Brunswick, Topsham and South Portland.