That's because the font being used to display those characters doesn't have
the required shapes to display spanish characters (although they are latin
chars).
How exactly are you putting them into your web page? Normally
non-ASCII characters, which includes all the accented characters, need
to be coded as &xxx; where xxx is a number, for example &130; is é (e
acute) or é (that may not be exact, I'm guessing it from
memory) can also be used. So if you prepared your HTML in a text
editor you may well have this problem. But if you use a WYSIWYG
program like Mozilla it is done automatically.