Code for elevating water heater in garages?
As I suspected, the code you're referencing is from the National Fuel Gas Code. I was not able to find anything in National Electrical Code, or International Residential Code that mentions this in the context of electric appliances.
So this code only applies to gas water heaters, and only those that are not listed as flammable vapor ignition resistant (FVIR).

NFPA 54: National Fuel Gas Code 2015
Chapter 9 Appliance, Equipment, and Accessory Installation
9.1 General.
9.1.10 Installation in Residential Garages.
9.1.10.1 Appliances in residential garages and in adjacent spaces that open to the garage and are not part of the living space of a dwelling unit shall be installed so that all burners and burner ignition devices are located not less than 18 in. (460 mm) above the floor unless listed as flammable vapor ignition resistant.