Sauropoda are an infraorder of saurischian ("lizard-hipped") dinosaurs. They had very long necks, long tails, small heads (in comparison to the rest of their body), and thick, pillar-like legs and peg-like teeth.

They are notable for the enormous size of some species. The group includes the largest animals ever to have lived on land. Well-known genera include Brachiosaurus, Diplodocus, Apatosaurus and Brontosaurus. 

Sauropods first appeared in the Upper Triassic period. Their probable ancestral group was the Prosauropoda.

By the Upper Jurassic (150 million years ago), sauropods had become widespread (especially the diplodocids and brachiosaurids). 

By the Upper Cretaceous, the diplodocids and brachiosaurs been replaced by the titanosaurs, which had a near-global distribution. They were larger relatives of the brachiosaurs. As with all other non-avian dinosaurs, the titanosaurs died out in the Cretaceous–Paleogene extinction event. Fossilised remains of sauropods have been found on every continent, including Antarctica. 

The name Sauropoda was coined by O.C. Marsh in 1878. Sauropods are one of the most recognizable groups of dinosaurs, and have become a fixture in popular culture due to their large sizes. Complete sauropod fossil finds are rare. Many species, especially the largest, are known only from isolated and disarticulated bones. Many near-complete specimens lack heads, tail tips and limbs.

Ecology 
Most studies in the 19th and early 20th centuries suggested that sauropods were too large to have supported their weight on land, and therefore that they must have been mainly aquatic. Most life restorations of sauropods in art through the first three quarters of the 20th century depicted them fully or partially immersed in water. 

This early notion was doubted by Kermack (1951). He showed that, if the animal were submerged in several metres of water, the pressure would be enough to fatally collapse the lungs and airway. However, this and other early studies of sauropod ecology had a flaw. They ignored evidence that the bodies of sauropods had many air sacs. In 1878, paleontologist E.D. Cope had even referred to these structures as "floats".

Beginning in the 1970s, the effects of sauropod air sacs on their  lifestyle began to be explored. Evidence from sedimentology and biotechnology showed that sauropods were primarily terrestrial animals. In 2004 D.M. Henderson noted that, with their extensive system of air sacs, sauropods could not submerge their bodies completely below the surface of the water. in other words, they would float. So they would not have been in danger of lung collapse due to water pressure when swimming.

Evidence for swimming in sauropods comes from fossil trackways that have occasionally been found to preserve only the forefeet (manus) impressions. Henderson showed that such trackways can be explained by sauropods with long forelimbs floating in shallow water, deep enough to keep the shorter hind legs free of the bottom, and using the front limbs to punt forward. However, floating sauropods would have been very unstable and poorly adapted for long periods in the water.

There definitely is evidence that they preferred wet and coastal habitats. Sauropod footprints are commonly found following coastlines or crossing floodplains. Sauropod fossils are often found in wet environments or mixed with fossils of sea animals. A good example of this is be the massive Jurassic sauropod trackways in lagoon deposits on Scotland's Isle of Skye.

Sauropod necks 
There is a long-running debate about sauropod necks. How flexible were they, how high or low was the neck in life: these are some of the issues. Many displays in museums are faulty. A review of the issues is available in free text.
"For instance, none were shaped like swan necks, and there is no support for the persistent suggestion they held their heads high habitually".

Here's another view: "Sauropods held their necks erect".

References