We extend a tight-binding total energy method to include f-electrons, and apply it to the study of the structural and elastic properties of a range of elements from Be to U. We find that the tight-binding parameters are as accurate and transferable for f-electron systems as they are for d-electron systems. In both cases we have found it essential to take great care in constraining the fitting procedure by using a block-diagonalization procedure, which we describe in detail.