which are covalent and which are ionic?

• carbon tetrachloride, CCl4(l)
• hydrogen fluoride, HF(g)
• potassium iodide, KI(s)
• magnesium oxide, MgO(s) .

I got that they are all ionic but that doesn't seem right

Here is a good discussion about ionic vs covalent compounds and how to distinguish how they are formed.

https://sciencenotes.org/ionic-vs-covalent-bonds/

To determine whether a compound is covalent or ionic, you need to consider the types of elements involved and their electronegativities.

Covalent compounds are formed when nonmetals combine with other nonmetals. In these compounds, electrons are shared between atoms. Ionic compounds, on the other hand, are formed when metals react with nonmetals. In these compounds, electrons are transferred from one atom to another, forming positive and negative ions.

Now let's analyze each compound:

1. Carbon tetrachloride (CCl4(l)): Carbon is a nonmetal, and chlorine is also a nonmetal. Both elements have relatively similar electronegativities. Therefore, carbon tetrachloride is a covalent compound.

2. Hydrogen fluoride (HF(g)): Hydrogen is a nonmetal, and fluorine is also a nonmetal. However, fluorine is more electronegative than hydrogen. This indicates that hydrogen fluoride has a polar covalent bond, where electrons are not shared equally between the atoms.

3. Potassium iodide (KI(s)): Potassium is a metal, and iodine is a nonmetal. Metals tend to lose electrons, while nonmetals gain electrons. In this case, potassium loses an electron to iodine to form positively charged potassium ions (K+) and negatively charged iodide ions (I-). Therefore, potassium iodide is an ionic compound.

4. Magnesium oxide (MgO(s)): Magnesium is a metal, and oxygen is a nonmetal. Similar to the previous case, magnesium loses two electrons to oxygen, resulting in magnesium ions (Mg2+) and oxide ions (O2-). Thus, magnesium oxide is also an ionic compound.

To summarize, carbon tetrachloride (CCl4(l)) is covalent, while hydrogen fluoride (HF(g)), potassium iodide (KI(s)), and magnesium oxide (MgO(s)) are ionic compounds.

A is covalent. You could have googled "Is CCl4 ionic or covalent" and found your answer.

B is polar covelent; i.e., slightly ionic, but mostly covalent but actually is a dipole which makes it polar.
C and D are ionic compounds. You could have googled all of these OR read on Google about covalent vs ionic bonds. Im surprised your text/notes didn't tell you. Generally those sources are quite good.