Of course they can bite, all venomous snakes bite, that's how they kill their prey. There's several spitting cobras species, some in Asia some in Africa. The spitters use spitting only to defend themselves. Wikipedia has all the knowledge you need to know about cobras. There's over 30 different species. Generally speaking, if you see a cobra and you back up to 5 meters then you'll be at a safe distance from a spitter.
What I love the most about cobras is the hissing sound they make because it says utterly unmistakingly 'get the f..k away from me!' ????
If you're into cobras, there's quite a few youtubers who keep venomous snakes, Chandlers Wildlife, Tyler Nolan, Dingo Dinkelman and N.E.R.D. would be a few worthy ones to check out.