A roof is the top covering of a building, including all materials and constructions necessary to support it on the walls of the building or on uprights; it provides protection against rain, snow, sunlight, extremes of temperature, and wind. A roof is part of the building envelope.
The characteristics of a roof are dependent upon the purpose of the building that it covers, the available roofing materials and the local traditions of construction and wider concepts of architectural design and practice and may also be governed by local or national legislation. In most countries a roof protects primarily against rain. A veranda may be roofed with material that protects against sunlight but admits the other elements. The roof of a garden conservatory protects plants from cold, wind, and rain, but admits light.
A roof may also provide additional living space, for example a roof garden.