"Yorktown" was at port in Norfolk during the attack on Pearl Harbor, having just completed a patrol of the Atlantic Ocean. She then sailed to San Diego in late December 1941 and was incorporated as the flagship of Task Force 17. Together with the carrier , she successfully attacked Japanese shipping off the east coast of New Guinea in early March 1942. Her aircraft sank or damaged several warships supporting the invasion of Tulagi in early May. "Yorktown" rendezvoused with "Lexington" in the Coral Sea and attempted to stop the invasion of Port Moresby, Papua New Guinea. They sank the light aircraft carrier on 7 May during the Battle of the Coral Sea, but did not encounter the main Japanese force of the carriers and until the next day. Aircraft from "Lexington" and "Yorktown" badly damaged "Shōkaku", but the Japanese aircraft critically damaged "Lexington" (which was later scuttled), and damaged "Yorktown".