The mortar finite element is an example of a non-conforming method which can be used to decompose and re-compose a domain into subdomains without requiring compatibility between the meshes on the separate components. We obtain stability and convergence results for this method that are uniform in terms of both the degree and the mesh used, without assuming quasiuniformity for the meshes. Our results establish that the method is optimal when non-quasiuniform h or hp methods are used. Such methods are essential in practice for good rates of convergence when the interface passes through a corner of the domain. We also give an error estimate for when the p version is used. Numerical results for h, p and hp mortar FEMs show that these methods behave as well as conforming FEMs. An hp extension theorem is also proved.