Metals tend to transfer their electrons to nonmetals when the two react. They will produce two ions. As a result, bonds between a metal and a nonmetal tend to be ionic.
Nonmetals tend to share electrons. As a result, bonds between two nonmetals tend to be covalent.
Noble gas elements are stable. They seldom react with other elements or with other noble gases.
Rb is a metal. Cl is a nonmetal. They tend to form ionic bonds.
H and O are nonmetals. They tend to form covalent bonds.
P and I are nonmetals. They tend to form covalent bonds.
Ne and He are noble gases. They won't react under standard conditions.