The quarterdeck is a raised deck behind the main mast of a sailing ship. Traditionally it was where the captain commanded his vessel and where the ship's colours were kept. This led to it being used as the main ceremonial and reception area onboard, and the word is still used to refer to such an area on a ship or even in naval establishments on land. Many such facilities have areas decorated like shipboard quarterdecks.
In the 20th century the word came to be applied to the area at the stern of the ship, often used for secondary weapons and (on battleships) seaplane catapults. In modern designs the stern has been roofed over by the helicopter deck but a large space remains underneath which is typically used for sonar equipment or small boats and which is still referred to as the quarterdeck in Commonwealth navies.
Ceremonial use 
There are ancient traditions of offering special deference to the quarterdeck. Greek, Roman, and Carthaginian warships all carried shrines which were given special respect. This continued into Christian times, and in medieval British warships, the religious shrine was set up on the quarterdeck. All hands were required to salute it by taking off their hats or caps. This led to the habit of saluting whenever one entered the quarterdeck. 
Today, quarterdeck refers not to a specific deck, but to a ceremonial area designated as such by the captain. As in the days of sail, it is a place where the captain has special control and prerogatives.
In port, the quarterdeck is the most important place on the ship, and is the central control point for all its major activities. Underway, its importance diminishes as control of the ship is transferred to the bridge. The quarterdeck is normally on the main deck, but may be elsewhere in some types of ship. It is usually marked off by special lines, deck markings, decorative cartridge cases, or fancy knotwork.
Special attention is paid to the quarterdeck's cleanliness and physical appearance. Those standing watch on the quarterdeck must be in the uniform of the day and present a smart appearance at all times. Personnel not in the uniform of the day generally avoid crossing the quarterdeck unless their work requires it. On ships with a well-defined quarterdeck area, uniformed personnel should salute when they enter it. Smoking and recreational activities are prohibited on the quarterdeck unless specially authorised by the commanding officer.
The starboard gangway to the quarterdeck is normally used by officers and their visitors; the port gangway is used by everyone else. In bad weather, all personnel use the lee gangway. On smaller ships with only one gangway, it may be rigged to either side and is used by everyone. Flagships sometimes have an additional starboard gangway for the flag officer and officers of his staff.
In sailing ships, the quarterdeck was that part of the main deck abaft the mainmast. The captain or master commanded the ship from the quarterdeck, as there was no bridge to serve this purpose. The quarterdeck was traditionally the place where the captain walked when on deck, usually on the windward side. The navigator also used it when taking his sights when fixing the vessel's position. On most ships, it was customary that only officers could use the quarterdeck, others being allowed there only when assigned for specific duties.
As powered ships came into use, the term was applied to the same approximate area of the ship. It came to be applied to the area at the stern of the ship, sometimes a separate stepped deck, often used for secondary weapons and (on battleships) seaplane catapults. In modern designs the stern has been roofed over by the helicopter deck but a large space remains underneath which is typically used for sonar equipment and small boats and which is still referred to as the quarterdeck in Commonwealth navies.
- Mack, William P.; Royal W. Connell (1980). Naval Ceremonies, Customs, and Traditions. Annapolis, Maryland: Naval Institute Press. pp. 156, 274. ISBN 0-87021-412-8.
- Dear, I.C.B. (ed.); Peter Kemp (2006). Oxford Companion to Ships and the Sea. Oxford: Oxford University Press. pp. 449–450. ISBN 0-19-920568-X.
- Bearden, Bill (1990). The Bluejackets' Manual. Annapolis, Maryland: United States Naval Institute. pp. 99–101. ISBN 1-55750-050-9.
- "DPA Projects - Sonar 2087". Ministry of Defence. May 2001. Archived from the original on 26 November 2001. has an example of British usage.