Grammar can be broadly defined as anything to do with language errors/errata.
In other words you are wrong -- it is both.
Although some might disagree and say it is spelling, or get nitpicky and say it's orthography. (If only because the broadness of grammar is intolerably offensive.)
And that was too much english.stackexchange.com for me, so I'm quitting now.