To provide a novel technique for producing a difference in refractive
index between two regions. An optical element according to the present
invention includes a first porous region (2002), a second porous region
(2004), and a non-porous region (2003) formed between the first porous
region (2002) and the second porous region (2004), the non-porous region
having a refractive index higher than a refractive index of the first
porous region.