The Battle of Midway was a decisive engagement fought in early June 1942 between elements of the Japanese Imperial Navy and the U.S. Navy. After their victory at Pearl Harbor, the Japanese fleet dominated the Pacific, and in May of 1942, they wanted to expand their sphere of influence by capturing the island of Midway, a possible jumping off point for an invasion of the Hawaiian Islands. But two decisive factors prevented Japanese victory in the battle. Unbeknownst to the Japanese, the Americans had cracked their naval code and were able to decipher their battle plans based on their radio transmissions, which gave the U.S. a huge advantage. Secondly, the American air assault on the Japanese fleet took place as many of the Japanese planes were being refueled on deck, making their carriers vulnerable to a devastating fire if a single bomb struck the flight deck. The presence of all that gasoline proved to be a stroke of luck for the Americans and a devastating disadvantage for the Japanese. The Shokaku, a main fleet aircraft carrier of the Japanese Imperial Navy, was unavailable for the Battle of Midway. During the decisive engagement, she was in the repair dock in Japan, having suffered bomb hits from American planes in the Battle of the Coral Sea. At Midway, Japan lost four main fleet carriers in the battle - Hiryu, Soryu, Kaga, and Akagi - a decisive defeat from which the Japanese Imperial Navy never recovered.

More Info: en.wikipedia.org