We study dimension theory for the C � -algebras of row-finite k-graphs with no sources. We establish that strong aperiodicity—the higher-rank analogue of condi- tion (K)—for a k-graph is necessary and sufficient for the associatedC � -algebra to have topological dimension zero. We prove that a purely infinite 2-graph algebra has real-rank zero if and only if it has topological dimension zero and satisfies a homological condition that can be characterised in terms of the adjacency matrices of the 2-graph. We also show that a k-graph C � -algebra with topological dimension zero is purely infinite if and only if all the vertex projections are properly infinite. We show by example that there are strongly purely infinite 2-graphs algebras, both with and without topological dimension zero, that fail to have real-rank zero.