Ref: DNA from the Beginning.org
Rather than looking at the pea plant as a whole, Mendel focused on seven individual traits that he could readily distinguish. He found that each trait has two alternate forms. For example, seed color can be green or yellow. By analyzing the results of various crosses, Mendel concluded that each alternative form of a trait is specified by alternative forms of a gene.
To follow the inheritance of genes from parent to child, Mendel first needed to be sure which genes each parent carried. Since pea plants are naturally self-fertilizing, “pure-bred” strains were readily available. Each strain contained only one form of the gene that determined a trait. Pure-bred plants with yellow seeds only produced offspring with yellow seeds. Pure-bred plants with green seeds only produced offspring with green seeds. From the results of further experiments, Mendel reasoned that pure-bred plants must have two copies of the same gene for each trait.