Tens of thousands of students returned to school in Shanghai and Beijing Monday after months of closures intended to curb the spread of the coronavirus, as China's major cities gradually return to normality.

Shanghai students in their final year of middle and high school returned to classrooms, while only high school seniors in Beijing were allowed back on campus to prepare for the all-important "gaokao" university entrance exam.

Shanghai students in their final year of middle and high school returned to classrooms
Shanghai students in their final year of middle and high school returned to classrooms AFP / Hector RETAMAL

But the students found life is still far from normal, with smaller classes, temperature checks, strict social distancing, and no physical education sessions.

China has largely curbed the spread of the deadly disease, but is still on high alert with growing fears of imported cases and a second wave of domestic infections in the northeast.

Teenager Meng Xianghao said he was taking extra precautions on his first day back at Beijing's Chenjinglun High School.

Chinese schools that have been closed or online-only since January began gradually reopening last month
Chinese schools that have been closed or online-only since January began gradually reopening last month AFP / GREG BAKER

"I brought masks, garbage bags and disinfectant," Meng, who had just taken the subway for the first time in months, told AFP as children in masks and tracksuit uniforms filed past police and officials.

"I'm glad, it's been too long since I've seen my classmates," said 18-year-old student Hang Huan. "I've missed them a lot."

A tent at the entrance was staffed by a person in a white hazmat suit, while a man wearing a container of disinfectant on his back sprayed the ground by the school gates.

China has largely curbed the spread of the deadly disease, but is still on high alert
China has largely curbed the spread of the deadly disease, but is still on high alert AFP / Hector RETAMAL

Inside the school, students were split into classes of about 20 -- smaller than before the epidemic -- while physical education classes have been cancelled, and lunch must be eaten in small groups inside classrooms rather than in the cafeteria, student Li Daimeng told AFP after her first day back.

She said students were given personal thermometers and required to take their temperatures twice a day, and keep at least one metre apart.

Beijing still has strict measures in place to prevent a new outbreak
Beijing still has strict measures in place to prevent a new outbreak AFP / GREG BAKER

"There are more procedures in school now," she said. "But I think I'm ok with it."

Across the country, schools that have been closed or online-only since January began gradually reopening last month, while virus epicentre Wuhan is set to reopen its high schools on May 6.

Students in the capital will have their temperatures measured at school gates and must show a "green" health code on a special app that calculates a person's infection risk, according to China's Ministry of Education.

The long absence from classrooms has added to the pressure on final-year students
The long absence from classrooms has added to the pressure on final-year students AFP / GREG BAKER

The ministry said some schools in Beijing had rehearsed the reopening with mock "students" in advance.

At least one Chenjinglun High School student was found to have an unusually high temperature at the start of the school day, and was taken to an isolation area for further checks, a student surnamed Zhang at the school told AFP.

"At the isolation area, they check your temperature at least five times to ensure it's below 37 degrees before letting you return to the classroom," he said.

Footage from the Communist Party-run Beijing Daily showed some of the city's 49,000 high-school seniors in classrooms Monday, wearing masks at desks which were spaced apart.

A screen at the front showed a photo of Chinese President Xi Jinping, as the teacher talked to the class about the significance of overcoming the COVID-19 pandemic.

In some cafeterias, students are assigned fixed spots spaced at least one metre apart, while similar measures are in place at Shanghai schools, the ministry said.

Beijing still has strict regulations in place to prevent a fresh outbreak, requiring visitors to the city to pass stringent tests and complete lengthy quarantine periods.

Beijing student Xiao Shuhan told AFP he thought the virus would change how classmates interact even as some semblance of normality returns.

"We'll no longer put our arms around each other's shoulders," he said.

The long absence from classrooms has added to the pressure on final-year students preparing for the high-stakes "gaokao" exam, which is the only route to Chinese universities and notoriously difficult.

"At school there's a certain atmosphere for learning and at home there is not," said Wang Yuchen, a 17-year-old student.

China said in March that it would postpone the exams by one month to July this year.