A finite element method for the fully-coupled magnetohydrodynamics