The close correlation between the structure and the properties of ultrathin films can be used to tailor thin films for specific purposes. For metallic films a modification of magnetic properties would be highly desirable. We will discuss such possibilities for films of 3d metals (Cr, Mn, Fe, Co and Ni) and surface alloys formed upon deposition on Cu(100) and Ni(100). Especially the weak magnets Fe and Mn exhibit a pronounced dependence of the magnetic properties on the film structure. Iron films on Cu(100) are a particularly tutorial example of the close correlation between magnetism and structure. Upon room temperature deposition, strained fcc iron can be stabilized up to 11 monolayers (ML) in two different modifications [1,2]. For thicknesses up to 5 ML, a (5 × 1) phase with expanded distances between all interlayers in the entire film is found. This offers a straightforward explanation for the observed ferromagnetism in this thickness regime. The films show a peculiar reconstruction pattern, which is indicative for a structural instability of the ferromagnetic fcc phase [1]. Above 6 ML, Fe films show a ferromagnetic coupling with perpendicular anisotropy at the surface only. This surface magnetism is related to an expanded interlayer distance at the surface while the interior of the film has a bulk-like fcc structure [2]. This behavior is compared with the properties of Mn films and surface alloys formed on Cu(001). The c(2 × 2) surface alloy is stabilized by large magnetic moments of the Mn atoms which are also responsible for the pronounced corrugation of the surface layer [3]. The concepts employed to understand iron films and Mn Cu surface alloys will be discussed and generalized.