We investigate how a magnetic field induces one-dimensional edge channels when the two-dimensional surface states of three-dimensional topological insulators become gapped. The Hall effect, measured by contacting those channels, remains quantized even in situations where the θ term in the bulk and the associated surface Hall conductivities, σ(xy)(S), are not quantized due to the breaking of time-reversal symmetry. The quantization arises as the θ term changes by ±2πn along a loop around n edge channels. Model calculations show how an interplay of orbital and Zeeman effects leads to quantum Hall transitions, where channels get redistributed along the edges of the crystal. The network of edges opens new possibilities to investigate the coupling of edge channels.