The thoracic cavity is the space within the ribcage and above the diaphragm. There are only two major organs in the thorax, and they are the heart and the lungs. The heart and the other nearby structures in the central area of the thorax are sometimes referred to as the mediastinum, a term which includes the esophagus, trachea, and thymus gland, as well as the heart and its associated vessels and membranes.
In the abdominal cavity we find most of the organs of the digestive system, along with a few other important items. The digestive system consists of the stomach, small intestine, large intestine, and colon, plus some accessory organs (the liver and pancreas). The spleen and kidneys are also found in the abdominal cavity.