A door is a moving mechanism used to block off and allow access to, an entrance to or within an enclosed space , such as a building , room or vehicle . Doors normally consist of one or two solid panels, with or without windows, that swing using hinges horizontally. These hinges are attached to the door 's edge but there are also doors that slide, fold or spin. The main purpose of a door is to control physical access.
Doors are significant in preventing the spread of fire and as a barrier to noise . Many doors are equipped with locking mechanisms to allow entrance to certain people and keep out others.
When opened, doors can allow people , animals , ventilation or light to pass through. The door is used to control the physical atmosphere within a space by enclosing the air drafts, so that interiors may be more effectively heated or cooled. When closed, a door normally impedes the transfer of air from one side to the other. Similar structures that do allow air to be transferred through some form of a grillwork are called gates.