The term 'photonics' describes a technology whereby data transmission and processing occurs largely or entirely by means of photons. Photonic crystals are microstructured materials in which the dielectric constant is periodically modulated on a length scale comparable to the desired wavelength of operation. Multiple interference between waves scattered from each unit cell of the structure may open a 'photonic bandgap'--a range of frequencies, analogous to the electronic bandgap of a semiconductor, within which no propagating electromagnetic modes exist. Numerous device principles that exploit this property have been identified. Considerable progress has now been made in constructing two-dimensional structures using conventional lithography, but the fabrication of three-dimensional photonic crystal structures for the visible spectrum remains a considerable challenge. Here we describe a technique--three-dimensional holographic lithography--that is well suited to the production of three-dimensional structures with sub-micrometre periodicity. With this technique we have made microperiodic polymeric structures, and we have used these as templates to create complementary structures with higher refractive-index contrast.