Final answer:
The main function of hemoglobin in red blood cells is to transport oxygen to body tissues, with a secondary role in carbon dioxide transport.
Step-by-step explanation:
The primary function of hemoglobin in red blood cells is to transport oxygen from the lungs to the body's tissues. Hemoglobin, an iron-containing protein, has the unique capability to bind oxygen molecules, with each molecule capable of carrying up to four oxygen molecules. In addition, hemoglobin also plays a minor role in transporting carbon dioxide away from body tissues, which is essential for maintaining the acid-base balance in the blood and facilitating the elimination of carbon dioxide through the lungs.