Naval warfare
The Qing navy proved woefully undermatched during the First and Second Opium Wars, leaving China open to de facto foreign domination; portions of the Chinese coastline were placed under Western and Japanese spheres of influence. The Qing government responded to its defeat in the Opium Wars by attempting to modernize the Chinese navy; placing several contracts in European shipyards for modern warships. The result of these developments was the Beiyang Fleet, which was dealt a severe blow by the Imperial Japanese Navy in the First Sino-Japanese War (1894–1895).
The battle between CSS Virginia and USS Monitor in the American Civil War was a duel of ironclads that symbolized the changing times. The first fleet action between ironclad ships was fought in 1866 at the Battle of Lissa between the navies of Austria and Italy. Because the decisive moment of the battle occurred when the Austrian flagship SMS Erzherzog Ferdinand Max successfully sank the Italian flagship Re d'Italia by ramming, in subsequent decade every navy in the world largely focused on ramming as the main tactic. The last known use of ramming in a naval battle was in 1915, when HMS Dreadnought rammed the (surfaced) German submarine, U-29.  The last surface ship sunk by ramming happened in 1879 when the Peruvian ship Huáscar rammed the Chilean ship Esmeralda. The last known warship equipped with a ram was launched in 1908, the German light cruiser SMS Emden.
With the advent of the steamship, it became possible to create massive gun platforms and to provide them with heavy armor resulting in the first modern battleships.  The Battles of Santiago de Cuba and Tsushima demonstrated the power of these ships.

20th century: In the early 20th century, the modern battleship emerged: a steel-armored ship, entirely dependent on steam propulsion, with a main battery of uniform caliber guns mounted in turrets on the main deck. This type was pioneered in 1906 with HMS Dreadnought which mounted a main battery of ten 12-inch (300 mm) guns instead of the mixed caliber main battery of previous designs.  Along with her main battery, Dreadnought and her successors retained a secondary battery for use against smaller ships like destroyers and torpedo boats and, later, aircraft.
Dreadnought style battleships dominated fleets in the early 20th century. They would play major parts in both the Russo-Japanese War and World War I. The Russo-Japanese War saw the rise of the Imperial Japanese Navy after their underdog victory against the waning Imperial Russian Navy at the Battle of Tsushima; while WWI pitted the old Royal Navy against the new Kaiserliche Marine of Imperial Germany, culminating in the 1916 Battle of Jutland. The future was heralded when the seaplane carrier HMS Engadine and her Short 184 seaplanes joined the battle. In the Black Sea, Russian seaplanes flying from a fleet of converted carriers interdicted Turkish maritime supply routes, Allied air patrols began to counter German U-boat activity in Britain's coastal waters, and a British Short 184 carried out the first successful torpedo attack on a ship.
In 1918 the Royal Navy converted an Italian liner to create the first aircraft carrier, HMS Argus, and shortly after the war the first purpose-built carrier, HMS Hermes was launched. Many nations agreed to the Washington Naval Treaty and scrapped many of their battleships and cruisers while still in the shipyards, but the growing tensions of the 1930s restarted the building programs, with even larger ships. The Yamato-class battleships, the largest ever, displaced 72,000 tons and mounted 18.1-inch (460 mm) guns.
The victory of the Royal Navy at the Battle of Taranto was a pivotal point as this was the first true demonstration of naval air power. The importance of naval air power was further reinforced by the Attack on Pearl Harbor, which forced the United States to enter World War II. Nevertheless, in both Taranto and Pearl Harbor, the aircraft mainly attacked stationary battleships. The sinking of the British battleships HMS Prince of Wales and HMS Repulse, which were in full combat manoeuvring at the time of the attack, finally marked the end of the battleship era. Aircraft and their transportation, the aircraft carrier, came to the fore.
During the Pacific War of World War II, battleships and cruisers spent most of their time escorting aircraft carriers and bombarding shore positions, while the carriers and their airplanes were the stars of the Battle of the Coral Sea, Battle of Midway, Battle of the Eastern Solomons, Battle of the Santa Cruz Islands and Battle of the Philippine Sea. The engagements between battleships and cruisers, such as the Battle of Savo Island and the Naval Battle of Guadalcanal, were limited to night-time actions in order to avoid exposure to air attacks. Nevertheless, battleships played the key role again in the Battle of Leyte Gulf, even though it happened after the major carrier battles, mainly because the Japanese carrier fleet was by then essentially depleted. It was the last naval battle between battleships in history. Air power remained key to navies throughout the 20th century, moving to jets launched from ever-larger carriers, and augmented by cruisers armed with guided missiles and cruise missiles.
Roughly parallel to the development of naval aviation was the development of submarines to attack underneath the surface. At first, the ships were capable of only short dives, but they eventually developed the capability to spend weeks or months underwater powered by nuclear reactors. In both world wars, submarines (U-boats in Germany) primarily exerted their power by using torpedoes to sink merchant ships and other warships. In the 1950s, the Cold War inspired the development of ballistic missile submarines, each loaded with dozens of thermonuclear weapon-armed SLBMs and with orders to launch them from sea if the other nation attacked.
Against the backdrop of those developments, World War II had seen the United States become the world's dominant sea power. Throughout the rest of the 20th century, the United States Navy maintained a tonnage greater than that of the next 17 largest navies combined.
The aftermath of World War II saw naval gunnery supplanted by ship to ship missiles as the primary weapon of surface combatants. Two major naval battles have taken place since World War II.
The Indo-Pakistani Naval War of 1971 was the first major naval war post World War II. It saw the dispatch of an Indian aircraft carrier group, heavy utilisation of missile boats in naval operations, total naval blockade of Pakistan by the Indian Navy and the annihilation of almost half of Pakistan's Navy. By the end of the war, the damage inflicted by the Indian Navy and Air Forces on Pakistan's Navy stood at two destroyers, one submarine, one minesweeper, three patrol vessels, seven gunboats, eighteen cargo, supply and communication vessels, as well as large-scale damage inflicted on the naval base and docks located in the major port city of Karachi. Three merchant navy ships, Anwar Baksh, Pasni, and Madhumathi, and ten smaller vessels were captured. Around 1,900 personnel were lost, while 1,413 servicemen (mostly officers) were captured by Indian forces in Dhaka. The Indian Navy lost 18 officers and 194 sailors and a frigate, while another frigate was badly damaged and a Breguet Alizé naval aircraft was shot down by the Pakistan Air Force.
In the 1982 Falklands War between Argentina and the United Kingdom, a Royal Navy task force of approximately 100 ships was dispatched over 7,000 miles (11,000 km) from the British mainland to the South Atlantic. The British were outnumbered in theatre airpower with only 36 Harriers from their two aircraft carriers and a few helicopters, compared with at least 200 aircraft of the Fuerza Aérea Argentina, although London dispatched Vulcan bombers in a display of long-distance strategic capacity. Most of the land-based aircraft of the Royal Air Force were not available due to the distance from air bases. This reliance on aircraft at sea showed the importance of the aircraft carrier. The Falklands War showed the vulnerability of modern ships to sea-skimming missiles like the Exocet. One hit from an Exocet sank HMS Sheffield, a modern anti-air warfare destroyer. Over half of Argentine deaths in the war occurred when the nuclear submarine Conqueror torpedoed and sank the light cruiser ARA General Belgrano with the loss of 323 lives. Important lessons about ship design, damage control and ship construction materials were learnt from the conflict.

21st century: At the present time, large naval wars are seldom-seen affairs, since nations with substantial navies rarely fight each other; most wars are civil wars or some form of asymmetrical warfare, fought on land, sometimes with the involvement of military aircraft. The main function of the modern navy is to exploit its control of the seaways to project power ashore. Power projection has been the primary naval feature of most late-century conflicts including the Korean War, Suez Crisis, Vietnam War, Konfrontasi, Gulf War, Kosovo War, the War on Terrorism in Afghanistan, and the Iraq War. A major exception to that trend was the Sri Lankan Civil War, which saw a large number of surface engagements between the belligerents involving fast attack craft and other littoral warfare units.
The lack of large fleet-on-fleet actions does not, however, mean that naval warfare has ceased to feature in modern conflicts.