<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
The electrons present in the outermost shell of an atom are called valence electrons. These electrons play a major role in chemical reactions by deciding the combining capacity of an element called valency.
The electronic configuration of the magnesium atom can be written as 2, 8, 2. Looking at the configuration, we can say that magnesium has two valence electrons.