A parapet is a barrier that is an upward extension of a wall at the edge of a roof,  terrace, balcony, walkway or other structure. The word comes ultimately from the Italian parapetto (parare 'to cover/defend' and petto 'chest/breast'). Where extending above a roof, a parapet may simply be the portion of an exterior wall that continues above the edge line of the roof surface, or may be a continuation of a vertical feature beneath the roof such as a fire wall or party wall.  Parapets were originally used to defend buildings from military attack, but today they are primarily used as guard rails, to conceal rooftop equipment, reduce wind loads on the roof,  and to prevent the spread of fires. In the Bible the Hebrews are obligated to build a parapet on the roof of their houses to prevent people falling (Deuteronomy 22:8).
Parapets may be plain, embattled, perforated or panelled,  which are not mutually exclusive terms.
The teachings of Moses prescribed parapets on roof edges for newly constructed houses as a safety measure ( Deuteronomy 22:8).
The Mirror Wall at Sigiriya, Sri Lanka built between 477 and 495 AD is one of the few surviving protective parapet walls from antiquity. Built onto the side of Sigiriya Rock it ran for a distance of approximately 250 meters and provided protection from inclement weather. Only about one hundred metres of this wall exists today, but brick debris and grooves on the rock face along the western side of the rock clearly show where the rest of this wall once stood. 
Parapets surrounding roofs are common in London. This dates from the Building Act of 1707 which banned projecting wooden eaves in the cities of Westminster and London as a fire risk.[ citation needed] Instead an 18-inch brick parapet was required, with the roof set behind. This was continued in many Georgian houses, as it gave the appearance of a flat roof which accorded with the desire for classical proportions.
In Shilpa Shastras, the ancient Indian science of sculpture, a parapet is known as hāra. It is optionally added while constructing a temple. The hāra can be decorated with various miniature pavilions, according to the Kāmikāgama. 
Many firewalls are required to have a parapet, a portion of the wall extending above the roof. The parapet is required to be as fire resistant as the lower wall, and extend a distance prescribed by building code.
Parapets on bridges and other highway structures (such as retaining walls) prevent users from falling off where there is a drop.  They may also be meant to restrict views, to prevent rubbish passing below, and to act as noise barriers.
Bridge parapets may be made from any material, but structural steel, aluminium, timber and reinforced concrete are common. They may be of solid or framed construction. 
In European standards, parapets are defined as a sub-category of "vehicle restraint systems" or "pedestrian restraint systems".
A parapet fortification (known as a breastwork when temporary) is a wall of stone, wood or earth on the outer edge of a defensive wall or trench, which shelters the defenders.   In medieval castles, they were often crenellated. In later artillery forts, parapets tend to be higher and thicker. They could be provided with embrasures for the fort's guns to fire through, and a banquette or fire-step so that defending infantry could shoot over the top. The top of the parapet often slopes towards the enemy to enable the defenders to shoot downwards; this incline is called the superior talus.