Gel Electrophoresis. DNA fragments migrating through an agarose gel medium are separated by size, with the smallest pieces moving farthest. The fragments are stained with ethidium bromide and appear as bands when viewed under ultraviolet light.