Will my Spain student visa be revoked if I don't attend class all semester? I had a changes of plans and will be backpacking through Europe instead.
I can't speak for Spain in particular but people taking student visas and then not attending school is regarded as a huge problem in the UK.
Though actual numbers of people doing this are believed to be quite low there is nonetheless a large dose of right wing hysteria that tens of thousands of people are doing this every year. It's why in recent years things have been made so difficult for would-be students from India and others.
As such in the UK at least this would be a very bad idea.
Though I'm not familiar with the hysteria being so high in other European countries it is still not allowed and very poorly regarded.
Nonetheless... it likely depends which country you are from. If you're from a the US or other related countries that don't need a visa to visit then it's unlikely to cause a big fuss with the immigration authorities. If you're from a developing country from which visas are required however then alarm bells will probably ring that you've decided to go off the radar and work illegally.
Regardless of the immigration authorities reaction there will likely be a big reaction from the university (your home school and the host). They are responsible for you and you've just gone missing. This could cause a massive panic unless you explicitly tell them you won't be attending the classes you had planned.
Basically don't do this.
Skip a lot of classes to travel a lot if you want. Its fine. Wealthy students do this all the time.
But skip the whole semester? Bad idea.