In this article, we take the parabolic equation with Dirichlet boundary conditions as a model to present the Legendre spectral methods both in spatial and in time. Error analysis for the single/multi-interval schemes in time is given. For the single interval spectral method in time, we obtain a better error estimate in L 2 -norm. For the multi-interval spectral method in time, we obtain the L 2 -optimal error estimate in spatial. By choosing approximate trial and test functions, the methods result in algebraic systems with sparse forms. A parallel algorithm is constructed for the multi-interval scheme in time. Numerical results show the efficiency of the methods. The methods are also applied to parabolic equations with Neumann boundary conditions, Robin boundary conditions and some nonlinear PDEs.