In this two-pronged work we report (a) a study of defect nucleation in three-dimensional confined nanoislands and (b) a surface-elasticity induced size effect in the optoelectronic properties of embedded and templated semiconducting nanostructures. Several key features in the design of nanostructure templates are analyzed and dislocation free contour maps are presented for combination of various lattice mismatches, substrates, and geometrical dimensions. Unlike the case for thin epitaxial films, it is found that for nanostructures, below a certain critical lateral dimension, dislocation free structures of any thickness can be grown. With regards to the optoelectronic properties of nanostructures, while size dependency due to quantum confinement and electrostatic interactions are well known, we show that an additional size-dependent strain is caused by the distinct elastic behavior of surfaces and interfaces at the nanoscopic scale compared to the macroscopic scale. This is in contrast to the usual way strain is linked to optoelectronic properties, i.e., via classical elasticity, which ignores surface energies and is intrinsically size independent. Surface strains appear to be only influential in the nanometer regime due to appreciable surface-to-volume ratios. Among our major conclusions are that errors as large as 100 meV in band-gap prediction can incur if this size-dependent surface effect is ignored. (C) 2004 American Institute of Physics.