Question words
The rule: Question words
Question and exclamation words are written with an accent mark: qué, quién, cuál, cómo, dónde, cuándo, cuánto. The accent mark stays in an indirect question, where there are no ¿? marks: No sé qué quiere, Dime dónde vives. The same words outside a question (as a conjunction or relative word) are written without an accent mark: la casa donde vivo, cuando llegues, creo que sí. Test: if a question is hidden inside the sentence (“I don't know — what?”, “tell me — where?”), the accent mark is needed.
Examples
¿Qué quieres?
direct question
direct question
No sé qué quiere.
indirect question — the accent mark stays
indirect question — the accent mark stays
Dime dónde vives.
indirect question
indirect question
La casa donde vivo.
relative “where” — no accent mark
relative “where” — no accent mark
¡Qué bonito!
exclamation — accent mark
exclamation — accent mark
Cuando llegues, llámame.
conjunction “when” — no accent mark
conjunction “when” — no accent mark