To get accents on the Mac, hold down the Option key, and while holding it down, type the letter e; then release those keys and type the letter that you want the accent to appear on:
á = Opt + e, then a
é = Opt + e, then e
í = Opt + e, then i
ó = Opt + e, then o
ú = Opt + e, then u
For the ñ, hold down the Option key while you type the n; release and type n again.
ñ = Opt + n, then n
To place the diaeresis over the u, hold down the Option key while pressing the u key; release and type u again.
ü = Opt + u, then u
The inverted punctuation marks are achieved as follows:
¡ = Opt + 1
¿ = Opt + shift + ?
Handy, finally I’m able to type those things instead of using the Character Palette / Keyboard Viewer!