Can anyone explain why covalent bonds are formed when nonmetals from the right side of the periodic table bond with each other with some examples?

Atoms bond to each other, usually, for one reason; that is, to complete their electron shell. There are two ways of doing this.

a. Metals (atoms on the left of the periodic table) join non-metals (atoms on the right of the periodic table). Here the metal losing one or more electrons and it is actually transferred to the non-metal. The metal atom now has a + charge and the non-metal has a - charge. The is called an ionic bond which actually is the attractive force between the + and - charges. The metal is left with its outside shell filled (having lost the electron(s) in its outer shell) and the non-metal has gained electrons to fill its outside shell. The term electronegativity is used to tell us how easily electrons lose (or gain) those electrons.
b. However, when two atoms that are alike try to combine, their electronegativity rating is exactly the same and neither electron has the ability to pull electrons from the other. These atoms must find another way to bond since they can't exchange electrons; therefore, they share their electrons. Basically, when two Cl atoms combine, they share their 14 electrons (7 electrons from each Cl atom) in such as way as to make each Cl atom think it has eight in its outside shell.
We can't draw these structures on the board
Cl:Cl with : top, bottom, and side of ech Cl atom.
Or the H atom is another example. Each H atom has 1 electron and it needs two so they share the two like this H:H. Thus each H atom thinks it has two electrons--we've made 1 electron do the job of two. Basically, then, atoms that are alike share electrons.

Certainly! Covalent bonds are formed when nonmetals from the right side of the periodic table bond with each other because both nonmetals have a tendency to gain electrons to achieve a stable electron configuration. To form a covalent bond, they share electrons between each other to reach a stable configuration.

Let's take two examples using nonmetals from the right side of the periodic table:

1. Water (H2O): In a water molecule, oxygen (O) forms a covalent bond with two hydrogen (H) atoms. Oxygen has six electrons in its outermost shell and needs two more to achieve a stable configuration. Each hydrogen atom, on the other hand, has one electron and needs one more to achieve stability. By sharing electrons, each hydrogen atom shares one electron with oxygen, while oxygen shares two electrons (one with each hydrogen atom). This sharing of electrons forms two covalent bonds in water.

2. Methane (CH4): In a methane molecule, carbon (C) forms covalent bonds with four hydrogen (H) atoms. Carbon has four electrons in its outermost shell and needs four more to achieve stability. Each hydrogen atom has one electron and needs one more to achieve stability. By sharing electrons, each hydrogen atom shares one electron with carbon, while carbon shares one electron with each hydrogen atom. This sharing of electrons forms four covalent bonds in methane.

In both examples, the nonmetals (oxygen and carbon) bond with other nonmetals (hydrogen) through the sharing of electrons, resulting in the formation of covalent bonds.