Integral invariants in maximally supersymmetric Yang-Mills theories are discussed in spacetime dimensions $4leq Dleq 10$ for $SU(k)$ gauge groups. It is shown that, in addition to the action, there are three special invariants in all dimensions. Two of these, the single- and double-trace $F^4$ invariants, are of Chern-Simons type in $D=9,10$ and BPS type in $Dleq 8$, while the third, the double-trace of two derivatives acting on $F^4$, can be expressed in terms of a gauge-invariant super-$D$-form in all dimensions. We show that the super-ten-forms for $D=10$ $F^4$ invariants have interesting cohomological properties and we also discuss some features of other invariants, including the single-trace $d^2 F^4$, which has a special form in $D=10$. The implications of these results for ultra-violet divergences are discussed in the framework of algebraic renormalisation.