Another way to say "a loft is at the top of a house" is "The top floor of a building can incorporate the shape of the roof."