Optical elements are provided. An optical element is formed by injecting
resin material into a mold through a gate in a first direction. The
optical element includes a main body, a flange surrounding and connecting
the main body, and a curved depression formed between the main body and
the flange. The main body has a central axis and a first curved surface.
The flange includes an annular abutting surface and a connecting portion.
The connecting portion has a connecting surface connecting the first
curved surface and the abutting surface. Both of the abutting surface and
the connecting surface are perpendicular to the central axis.