Since it is possible to increase the distance between the element mounting surface on which the semiconductor element is mounted and the surface exposed from the resin sealing portion, ingress of gas, moisture or other substances which would have an adverse effect on the semiconductor element or wiring can be restricted.