Interface in this context indicates that it is a contract.
You know what it is API? Application Programming Interface. It’s the same thing as the term in that context. It’s what defines how you should use something. It is what allows contact of your code with the internal code of a technology that is available to you.
Let’s translate one of these texts:
The HTMLElement
interface represents any HTML element
Would be:
The mechanism of communication with the browser called HTMLElement
represents any HTML element.
Better use the term that already indicates all this in a word.
Each one of them is for something a little different and has to read the documentation of each, I think the question is not about that, because if it were wide.
I think this should interest you tb https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Categorias_de_contents
– hugocsl