The group III nitrides (AlN, GaN and InN) represent an important trio of semiconductors because of their direct band gaps which span the range 1.95-6.2 eV, including the whole of the visible region and extending well out into the ultraviolet (UV) range. They form a complete series of ternary alloys which, in principle, makes available any band gap within this range and the fact that they also generate efficient luminescence has been the main driving force for their recent technological development. High brightness visible light-emitting diodes (LEDs) are now commercially available, a development which has transformed the market for LED-based full colour displays and which has opened the way to many other applications, such as in traffic lights and efficient low voltage, flat panel white light sources. Continuously operating UV laser diodes have also been demonstrated in the laboratory, exciting tremendous interest for high-density optical storage systems, UV lithography and projection displays. In a remarkably short space of time, the nitrides have therefore caught up with and, in some ways, surpassed the wide band gap II-VI compounds (ZnCdSSe) as materials for short wavelength optoelectronic devices. The purpose of this paper is to review these developments and to provide essential background material in the form of the structural, electronic and optical properties of the nitrides, relevant to these applications. We have been guided by the fact that the devices so far available are based on the binary compound GaN (which is relatively well developed at the present time), together with the ternary alloys AlGaN and InGaN, containing modest amounts of Al or In. We therefore concentrate, to a considerable extent, on the properties of GaN, then introduce those of the alloys as appropriate, emphasizing their use in the formation of the heterostructures employed in devices. The nitrides crystallize preferentially in the hexagonal wurtzite structure and devices have so far been based on this material so the majority of our paper is concerned with it, however, the cubic, zinc blende form is known for all three compounds, and cubic GaN has been the subject of sufficient work to merit a brief account in its own right. There is significant interest based on possible technological advantages, such as easier doping, easier cleaving (for laser facets) and easier contacting.