A finite element method based on the time dependent basis functions is presented for solving a one phase Stefan problem for the heat equation in one space dimension. The stability and the convergence of the method are studied, and a numerical example is given.