How to avoid CKeditor to change the HTML code? I want to add code like &lt;a&gt;&lt;div&gt;&lt;/div&gt;&lt;/a&gt; to make the whole block as a link, but after saving it getting changed to &lt;div&gt;&lt;a&gt;&lt;/a&gt;&lt;/div&gt;. I am using CKeditor module, have done changes in config/text-format/filter HTML to disable the Limit allowed HTML tag. In short I want that editor do not do anything with HTML code.
I know that this is not the answer to your problem (which is annoying) but personally I would avoid putting a &lt;div&gt; inside a &lt;a&gt; tag. It is normally not allowed to put a "block" type of tag inside an "inline" type of tag.

So you could do the following:

&lt;a class="block"&gt;&lt;span&gt;Your stuff&lt;/span&gt;&lt;/a&gt;


and then add a CSS rule:

a.block,
a.block &gt; span {
  display: block;
}


This way you are HTML valid and CKEditor should not try to correct it.