Among the Latin abbreviations, e.g. and i.e. can be considered to belong the most commonly misused. While both terms are deemed to be formal, using them in informal, business, or technical writing is acceptable. Other than being both abbreviations of Latin phrases, these two share no other similarities.
The abbreviation e.g. is short of the Latin phrase exempli gratia, which means “for example.”
“However, if the polling place is held in a location with a firearm ban (e.g., a school), that is obviously still in effect on Election Day.”
CNN“Often fails to give close attention to details or makes careless mistakes in schoolwork, work, or during other activities (eg, overlooks or misses details, work is inaccurate).”
The Irish Times“Today, the tech industry is developing AI platforms and tools (e.g. Microsoft’s and IBM’s open source AI toolkits and APIs) that can be operated by non-specialists.”
Huffington Post
On the other hand, the abbreviation i.e. is short for the Latin phrase id est, which means “that is,” “namely,” or “in other words.” A simple way to determine whether you are using the abbreviation correctly is to replace it with “in other words” and if it makese sense, then you are using it properly.
“… legislators have made it illegal to advertise temporary accommodation for less than 30 days if you live in a “multi unit”, i.e, an apartment building.”
BBC“Does beating Texas A&M on Thanksgiving move Coach O into position of being the fallback candidate if the Tigers can’t get their target — i.e. Jimbo Fisher?”
The Washington Post“We hope that chosen policies will not throw the macroeconomic baby (i.e., decent cyclical dynamics and low nominal volatility) out with the structural bathwater (i.e., low productivity and dissatisfaction by many households over what they see as slowly rising living standards).”
Bloomberg
Even though they are Latin abbreviations, there is no need to italicize both terms as they are generally considered standard English.
A good way to remember when to use e.g. and i.e. is to take note of the first letters. Since e.g. starts with the letter “e,” you use it to give examples while i.e., which starts with the letter “i” should be used to mean “in other words.”