To prevent the occurrence of coating failure of an alignment layer caused by the difference in level of the upper layer generated by forming a light shielding film in an optoelectronic device, unevenness in the rubbing process for the film and cracks in opposing electrodes.
Liquid crystals are held between a pair of substrates. On a substrate (20R) among the pair of substrates, a light shielding film (500) having a prescribed pattern is partially buried on the surface of the side opposing to the liquid crystals. On the other substrate among the pair of the substrates, display electrodes and wiring that is directly connected to the display electrodes or through switching elements are provided on the surface of the side opposing to the liquid crystals. The light shielding film is preferably formed in grooves (700).