Horror film
The first depictions of the supernatural on screen appear in several of the short silent films created by the French pioneer filmmaker Georges Méliès in the late 1890s. The best known of these supernatural-based works is the 3-minute short film "Le Manoir du Diable" (1896), also known in English as "The Haunted Castle" or "The House of the Devil". The film is sometimes credited as being the first ever horror film. In "The Haunted Castle", a mischievous devil appears inside a medieval castle and harasses the visitors. Méliès' other popular horror film is "La Caverne maudite" (1898), which translates literally to "the accursed cave". The film, also known for its English title "The Cave of the Demons", tells the story of a woman stumbling over a cave that is populated by the spirits and skeletons of people who died there. Méliès would also make other short films that historians consider now as horror-comedies. "Une nuit terrible" (1896), which translates to "A Terrible Night", tells a story of a man who tries to get a good night's sleep but ends up wrestling a giant spider. His other film, "L'auberge ensorcelée" (1897), or "The Bewitched Inn", features a story of a hotel guest getting pranked and tormented by an unseen presence. 
In 1897, the accomplished American photographer-turned director George Albert Smith created "The X-Ray Fiend" (1897), a horror-comedy that came out a mere two years after x-rays were invented. The film shows a couple of skeletons courting each other. An audience full of people unaccustomed to the idea would have found it frightening and otherworldly. The next year, Smith created the short film "Photographing a Ghost" (1898), consisdered a precursor to the paranormal investigation subgenre. The film portrays three men attempting to photograph a ghost, only to fail time and again as the ghost eludes them and throws chairs.
Japan also made early forays into the horror genre. In 1898, Japanese film company Konishi Honten released two horror films both written by Ejiro Hatta; "Shinin No Sosei" (Resurrection of a Corpse), and "Bake Jizo" (Jizo the Spook) "Shinin No Sosei" told the story of a dead man who comes back to life after having fallen from a coffin that two men were carrying. (the writer Hatta played the dead man, while the coffin-bearers were played by Konishi employees.) Though there are no records of the cast, crew, or plot of "Bake Jizo", it was likely based on the Japanese legend of Jizo statues, believed to provide safety and protection to children. The presence of the word bake—which can be translated to "spook," "ghost," or "phantom"—may imply a haunted or possessed statue. (In Japan, Jizō, or respectfully as "Ojizō-sama", is a beloved divinity who is seen as the guardian of children, and in particular, children who died before their parents. He has been worshipped as the guardian of the souls of "mizuko", the souls of stillborn, miscarried, or aborted fetuses.)
Spanish filmmaker Segundo de Chomón is regarded as the most significant Spanish silent film director in an international context. He was popular for his frequent camera tricks and optical illusions, an innovation that contributed heavily to the popularity of trick films in the period. His famous works include "Satán se divierte" (1907), which translates to "Satan Having Fun", or "Satan at Play"; "La casa hechizada" (1908), or "The House of Ghosts", considered to be one of the earliest cinematic depictions of a haunted house premise; and "Le spectre rouge" (1907) or "The Red Spectre", a collaboration film with French director Ferdinand Zecca about a demonic magician who attempts to perform his act in a mysterious grotto.
Film noir
The film now most commonly cited as the first "true" "film noir" is "Stranger on the Third Floor" (1940), directed by Latvian-born, Soviet-trained Boris Ingster. Hungarian émigré Peter Lorre—who had starred in Lang's "M"—was top-billed, although he did not play the primary lead. He later played secondary roles in several other formative American noirs. Although modestly budgeted, at the high end of the B movie scale, "Stranger on the Third Floor" still lost its studio, RKO, US$56,000 (), almost a third of its total cost. "Variety" magazine found Ingster's work: "...too studied and when original, lacks the flare to hold attention. It's a film too arty for average audiences, and too humdrum for others." "Stranger on the Third Floor" was not recognized as the beginning of a trend, let alone a new genre, for many decades.
Most film noirs of the classic period were similarly low- and modestly-budgeted features without major stars—B movies either literally or in spirit. In this production context, writers, directors, cinematographers, and other craftsmen were relatively free from typical big-picture constraints. There was more visual experimentation than in Hollywood filmmaking as a whole: the Expressionism now closely associated with noir and the semi-documentary style that later emerged represent two very different tendencies. Narrative structures sometimes involved convoluted flashbacks uncommon in non-noir commercial productions. In terms of content, enforcement of the Production Code ensured that no film character could literally get away with murder or be seen sharing a bed with anyone but a spouse; within those bounds, however, many films now identified as noir feature plot elements and dialogue that were very risqué for the time.
Thematically, film noirs were most exceptional for the relative frequency with which they centered on women of questionable virtue—a focus that had become rare in Hollywood films after the mid-1930s and the end of the pre-Code era. The signal film in this vein was "Double Indemnity", directed by Billy Wilder; setting the mold was Barbara Stanwyck's unforgettable femme fatale, Phyllis Dietrichson—an apparent nod to Marlene Dietrich, who had built her extraordinary career playing such characters for Sternberg. An A-level feature all the way, the film's commercial success and seven Oscar nominations made it probably the most influential of the early noirs. A slew of now-renowned noir "bad girls" followed, such as those played by Rita Hayworth in "Gilda" (1946), Lana Turner in "The Postman Always Rings Twice" (1946), Ava Gardner in "The Killers" (1946), and Jane Greer in "Out of the Past" (1947). The iconic noir counterpart to the femme fatale, the private eye, came to the fore in films such as "The Maltese Falcon" (1941), with Humphrey Bogart as Sam Spade, and "Murder, My Sweet" (1944), with Dick Powell as Philip Marlowe.