Both salinity and temperature affect ocean water density, but temperature has the bigger influence upon density. Seawater is warmest at the surface of the ocean. Water expands where it is warm, which decreases its density. This demonstrates that the two variables are inversely related—when one goes up, the other goes down.
Review the graph below. The y axis shows ocean depth at a location near the equator. The depth of the ocean surface is zero. Label the two curves for ocean water temperature and density variation with depth. Label the other features on the graph.