Code says it MUST be at least 18" off of the floor, so that combustable heavy gasses cannot be ignited as easily by the pilot light. That is why you see GAS water heaters up on platforms. If you are in the process of doing this, keep in mind that water weighs about 8# per gallon, so a 40 gallon water heater would weigh about 85# empty, but 405# when it's full. The water heater needs to be strapped securely to the wall to prevent toppling, and code requires that if this is in the garage, that you provide a barrier to prevent running into the furnace and water heater with your car, not that I have seen a garage with an actual car in it for a long time. People usually have too much stuff to do that.
A barrier usually consists of a 4" steel post cast into the garage floor. Some people paint these black, but I like a really obnoxious yellow. The post won't move much so you want to know EXACTLY where that sucker is.
Post back with more specific questions if this didn't do it for ya.