The paper presents the shape optimization of steel plane trusses, performed by the nonlinear programming (NLP) approach. Introduced is structural synthesis, where the optimization of the dimensions of cross-sections and the shape of trusses are carried out simultaneously. The objective function to be minimized defines the mass of the structure; it is subjected to the set of (in)equality constraints. The finite element equations are as the equality constraints defined for the calculation of internal forces and deflections of the structure. Constraints for the dimensioning of steel members are determined in accordance with Eurocode 3. Beside the theoretical basics, two examples of the shape optimization of trusses are presented at the end of the paper.