Allo,
MODx generally uses the Tiny editor. I’ll assume you’re using that.
The first thing you need to do is make sure you click the small "HTML" button, and put your HTML there rather than in the regular editor window. But I bet you already did that.
The other thing you might be seeing is that despite using the HTML editor, Tiny will, in some cases, add or remove its own HTML when you save the page. This is well-intentioned, I guess, but annoying at times. There are ways around this, too.
When you edit the page, you can click Settings, and remove the checkmark from "Rich Text". Then Tiny cannot interfere with your HTML.
The last way is to make a "chunk". Resources... Manage Resources... Chunks. (or Elements.. Manage Elements... Chunks if using Evolution). Then you pull that into your document using {{MaNouvelleChunk}}.
I hope that helps.
Dave