One day last month, a New York City health inspector showed up at the juice cart at 54th Street and Avenue of the Americas where Long Huynh works. The inspector spent about an hour examining ingredients for freshness, and making sure the work equipment and surfaces were spotless and organized.

“He got up all inside there,” said Mr. Huynh, 54. “But I am very particular. I clean the inside well.”

Mr. Huynh’s diligence was rewarded Friday when his cart became one of the first to receive a letter grade from the city Department of Health and Mental Hygiene. A placard bearing a blue A was affixed to the front of the cart. “They gave me the big one,” he said.

Since 2010, city inspectors have been assigning grades to restaurants, which are required to post them prominently, as a way to heighten awareness of food safety and hold restaurants more accountable. Though owners still complain about the fairness of the grading, and the fines that accompany violations, the practice has become more or less accepted; today, more than 90 percent of the city’s 24,000 restaurants receive A grades.