Sedimentary rocks are the only type of rocks that contain fossils. Fossils give us a great deal of information. They tell us about the environment when the sediments were deposited. For example, if we find coral fossils in the rock, it was most likely deposited in sea water because corals live in marine environments.