“The Necklace” is written in the realist style. In 1884, when the story was written and published, Realism (~1850-1890) was the dominant literary movement in Europe. The movement began in France and spread across Europe and to the United States over the course of the late-19th century. Emilie Zola and Gustave Flaubert (a mentor and close friend of de Maupassant) were early innovators in the genre.
A reaction to the sentimentality of Romanticism, Realism focused on trying to capture everyday life in a manner that was unclouded by emotion or moral judgment. The Realists wanted to reproduce lived experience in fiction as perfectly as possible. Stylistically, the movement rejected overt lyricism and happy endings in favor of direct, concise prose. Inspired in part by increased urbanization and modernization in Europe, Realism found its subject matter in the new struggles of urban living and often focused on the plight of poor and marginalized people in major cities.
“The Necklace” contains many of the traditional stylistic marks of this genre. The painful elements of Mathilde’s life, as well as the story’s realistic descriptions of hard labor and its effects on her health and appearance, are hallmarks of Realism. However, the morality at the heart of “The Necklace” complicates its categorization as a traditional realist piece. The tone of this story suggests that de Maupassant judges Mathilde at least in part for her materialism and vanity, so there's a certain moralizing element to "The Necklace" that doesn't necessarily align with Realism's interest in simply depicting true-to-life experiences.