Yes, some elements can form both covalent and metallic bonds. One such example is the element carbon (C).
Carbon can form covalent bonds by sharing electrons with other atoms, resulting in the formation of molecules or covalent compounds. Examples of covalent compounds involving carbon include methane (CH4), carbon dioxide (CO2), and ethene (C2H4).
On the other hand, carbon can also participate in metallic bonding when it forms a crystal lattice structure, as seen in the case of diamond and graphite. In these structures, carbon atoms are bonded together in a network, with delocalized electrons moving freely throughout the lattice. This delocalized electron cloud gives rise to the characteristic properties of metals, such as high electrical conductivity and malleability.
So, carbon is an element that can form covalent bonds in molecular compounds and participate in metallic bonding in certain crystal structures.