The self-duality and self-orthogonality of linear codes are very important properties. A linear code is called an MDS self-dual (self-orthogonal) code if it is both a code reached Singleton bound and a self-dual (self-orthogonal) code with respect to the Euclidean inner product. The parameters of MDS self-dual codes are completely determined by the code length. Recently, the new constructions of MDS self-dual (self-orthogonal) codes have been widely investigated, and several new classes of codes with different lengths have been found.In this paper, we utilize generalized Reed-Solomon (GRS) codes and extended GRS codes to construct MDS self-dual codes, MDS self-orthogonal codes and MDS almost self-dual codes over F q (q = r 2 , r is a power of an odd prime). The main idea of our constructions is to choose suitable evaluation points such that the corresponding (extended) GRS codes are Euclidean self-dual (self-orthogonal). The evaluation sets are consists of two subsets which satisfy some certain conditions and the length of these codes can be expressed as a linear combination of two factors of q − 1. Four families of MDS self-dual codes, two families of MDS selforthogonal codes and two families of MDS almost self-dual codes are obtained and they have new parameters.