We present a range of mesh-dependent inequalities for piecewise constant and continuous piecewise linear finite element functions u defined on locally refined shape-regular (but possibly non-quasiuniform) meshes. These inequalities involve norms of the form kh ff uk W s;p(\Omega\Gamma for positive and negative s and ff, where h is a function which reflects the local mesh diameter in an appropriate way. The only global parameter involved is N , the total number of degrees of freedom in the finite element space, and we avoid estimates involving either the global maximum or minimum mesh diameter. Our inequalities include new variants of inverse inequalities as well as trace and extension theorems. They can be used in several areas of finite element analysis to extend results - previously known only for quasiuniform meshes - to the locally refined case. Here we describe applications to: (i) the theory of nonlinear approximation and (ii) the stability of the mortar element method for locally refined meshes