It's not a problem of HTML, but the method you use to construct translation string key names.
If you have `<button>file</button>` and use it in both "[file] a complaint" and "save to a [file]", then you're in trouble indeed.
But you can fix that by adding context to translation keys in the template, e.g. in TAL you can do `<button i18n:translate="'file (verb)'">file</button>`.
It's not just an issue of polysemy (that "file" means two different things in English), but that the structure itself may need to be different in different languages, because languages have different grammars, and different ways of dealing with objects/numbers/etc.
In the example I linked above, there's a whole mess of rules to capture if you want to handle singular/plural correctly in different languages, including those that distinguish more cases than singular and plural. It boils down to the fact that word-for-word translation doesn't work in all but the simplest cases: you can't translate "[a] [b] [c] [d]" by having 4 lookup tables for [a], [b], [c], and [d] and then plugging them into a template independently.
This can get quite tricky, because languages don't easily map onto 1-to-1 items that can be just translated independently and stuck into a template. See the classic "localization horror story": http://interglacial.com/tpj/13/ (and HN discussion: http://news.ycombinator.com/item?id=2095334)