This course introduces variational formulations and associated finite element methods for partial differential equations in continuum mechanics, including both elliptic and hyperbolic equations. An equal emphasis is placed on mathematical theory and practical implementation. Theoretical topics include discussions of well-posedness, optimality, and a priori and a posteriori error estimates. Practical topics include implementation of finite elements, matrix and vector assembly, adaptive mesh refinement, and Krylov-subspace linear solvers.