Here's why:
* Valence electrons are the electrons in the outermost shell of an atom, and they are the ones involved in chemical bonding.
* Nonmetals are located on the right side of the periodic table. They tend to gain electrons to achieve a stable octet (8 valence electrons) like the noble gases.
Examples:
* Oxygen (O) has 6 valence electrons.
* Chlorine (Cl) has 7 valence electrons.
* Nitrogen (N) has 5 valence electrons.
Keep in mind that there are some exceptions, like hydrogen (H) which only has 1 valence electron. But in general, nonmetals have a high number of valence electrons.