Loading dye increases the density of DNA samples, allowing them to sink into gel wells, and gives color to visually track samples. Larger DNA fragments with more base pairs move slower and are located toward the top of the gel due to their lower mobility. A marker or ladder containing DNA fragments of known sizes is used to determine the size of unknown fragments in a sample.