The Chinese state- and party-run news media have been critical of Ms. Tsai in her first week in office. One report even suggested that her status as a single woman made her “extreme.” That article, carried on the website of a newspaper run by Xinhua, the state news agency, was widely criticized and quickly removed from most Chinese websites.

China considers self-ruled Taiwan to be part of its territory and says it must eventually be united with the mainland. Ms. Tsai heads the Democratic Progressive Party, which is traditionally pro-independence, but she has said she wants to maintain the status quo between the mainland and the island.

China has censored images of Taiwan’s flag before. Last year, when Ma Ying-jeou, then Taiwan’s president, spoke about plans to meet with President Xi Jinping of China in Singapore, a flag pin on Mr. Ma’s lapel was blurred out in mainland news coverage.

And when Chou Tzu-yu, a Taiwanese member of a Korean pop group appeared in a video in January waving the flag, some mainland Chinese fans were incensed and called her a separatist. She issued an apology online.

But later, a WeChat account affiliated with People’s Daily said there was nothing separatist about Taiwan’s flag, which is a symbol of the Republic of China. “Chou Tzu-yu brandishing the ‘national flag’ is emphasizing the ‘Republic of China,’ ” the commentary said. “The ‘Republic of China’ includes the principle of ‘One China.’ ”