The structural and electronic properties of InxGa1-xN alloys are studied as a function of c-plane biaxial strain and In ordering by density functional theory with the Heyd-Scuseria-Ernzerhof (HSE) hybrid functional. A nonlinear variation of the c lattice parameter with In content is observed in biaxial strain and should be taken into account when deducing In content from interplanar distances. From compressive to tensile strain, the character of the top valence-band state changes, leading to a nonlinear variation of the band gap in InxGa1-xN. Interestingly, the well-known bowing of the InxGa1-xN band gap is largely removed for alloys grown strictly coherently on GaN, while the actual values for band gaps at x < 0.33 are hardly affected by strain. Ordering plays a minor role for lattice constants but may induce changes of the band gap up to 0.15 eV.