Why do I need to write an accent on “¡qué!”? And why sometimes I don't need it?
The word “que” is a high frequent used term in Spanish. “Que” is a relative pronoun, an interjection, a conjunction, and an adverb. The ones we have here are both part of interjections, however both have different meanings. Let's see why.
¡Qué! Is usually an interjection that can be used in expressions that may be close to statements. Note that I have included literal translations when possible, just to help you understand the sentences better.
¡Qué bonito! = How pretty! [literally] - It's pretty!
¡Qué colores tan vivos! = How vivid are the colors! [kind of literally] - The colors are so vivid!
¡Qué viva la música! = How vivid is the music! [literally] - The music is so vivid! Or The music is so alive!
By the way, remember that “que” may mean “how” instead of “what.”
There is an idiomatic expression, “ser vivo,” that means to be smart and at the same time to take advantage of someone else. On the phrase,
¡Qué vivo eres, Antonio!
the meaning depends a lot on the intonation of the speaker and the context where it is used. For example, it can mean, “You are so smart, Antonio!” But, most of the time, this type of phrase translates as “You're so slick, Antonio!”
Sometimes, ¡Qué! is more of a question, but a question we ask when we are surprised, happy, or mad. Here are a few examples:
¡Qué tal, Armida! = How are you, Armida?! Or What's up, Armida?!
¡Qué onda, Esteban! = What's up, Esteban?!
¡Qué cuentas, amigo! = What do you tell, my friend? [literally] or What's new, my friend?!
¡Qué le hiciste a mi coche, Ema! = What did you do to my car, Ema?
The ¡que! [without accent] is actually an incomplete phrase. Quite often, Spanish speakers do not mention the independent clause [first part of the phrase], but they will say “que” and the dependent clause. For example,
--¿Qué dices, mi amor? = What do you say, my love? [literal] or What are you saying, my love?
--¡Que te amo! = (I'm saying) That I love you!
--¡(Quiero) Que me dejes en paz! = I want you to leave me alone!
--¡(Espero/Te deseo) Que te diviertas! = (I hope/I wish you) Have fun!
--¡(Espero/Te deseo) Que tengas un buen fin de semana! = (I hope/I wish you) Have a great weekend!
The last three phrases on the previous batch have subjunctive, but most of the time we imply the subjunctive, similar to English when we say, “Have a nice day!” The difference is that in Spanish we need the “que.” By the way, this “que” is a conjunction—like “and” in English or “y” in Spanish—because it is linking two sentences.
After Spain won a soccer match against England, I wrote on Facebook the following phrase,
“¡Qué viva España!”
Everybody was so happy that none of my friends cared about the accent over the “e.” Or maybe, nobody really cared about it. Or perhaps they thought that whatever I—the Spanish teacher—writes must be correct. What my Facebook friends understood was,
Long live Spain! [¡Que viva España!]
But what I wrote, ¡Qué viva España!, was a little bit different,
How smart/slick is Spain!
How vivid is Spain!
How alive is Spain!
In any case, all of these three phrases were valid in the context.
If this helps, write a comment, please. Que tengas un buen día.