Nicole Manning, a ninth-grade math teacher at Herbert H. Lehman High School in the Bronx, estimated that up to half of her students did not have internet access at home.

“We can’t do distance learning,” she said. “It wouldn’t be fair.”

Valerie Green-Thomas, a teachers’ coach at Middle School 390 in the South Bronx, said she would be concerned that students would not have access to crucial medical help at the school’s on-site clinic if there were widespread closings.

“We have a lot of underserved kids,” Ms. Green-Thomas said.

The situation has been starkly different thus far at some of the city’s elite private schools, where the student bodies tend to be much whiter and wealthier than they are in public schools.

Spence, an all-girls school on Manhattan’s Upper East Side, closed on Friday for a “comprehensive sanitization of the entire campus,” according to a notice posted on its website. It was unclear whether the school had a link to one of New York State’s confirmed coronavirus cases. School representatives did not respond to requests for comment.

Collegiate, a private all-boys school on the Upper West Side, was also closed on Friday for a similar purpose. An email to families from the school’s headmaster did not indicate any connections to a confirmed case, but said that a parent of one student might have been exposed to the virus.

Private schools can decide to close independently, but public schools must follow guidance from the city and state education departments.

In interviews, public-school teachers across the city exuded calm and said that they believed school was a safe place for children to be given the current circumstances. It appeared that most parents agreed: Student attendance rates were as high if not higher this past week than they were a year ago at this time, Mr. de Blasio said.