Homeless shelters across New York City are serving substandard food, a half-dozen shelter residents said Thursday at a City Council hearing.

The residents, who have lived in various shelters, compared the food to slop. Some said they were served moldy cartons of orange juice and ice-cold french toast. One resident recalled shelter staff laughing at her when she requested a halal or kosher meal during Ramadan even though the city’s Department of Homeless Services guarantees religious accommodation for meals.

Councilman...