Prevent Stripped Attributes
By default, WordPress strips out the class and id attributes from all tags entered in a post. There are some security reasons for doing this so exercise caution before over-riding this behavior.
What is the Need?
You might ask why would I need to have class or id attributes in my tags. Well, the answer is that for most users and for most of your posts you do not need the attributes. There are, however; some circumstances where these provide additional layout options.
As an example; one of my clients wanted quotes from newspapers to have a special newspaper-like background. In standard HTML/CSS, this is relatively easy to do using <div id=”newspaper”></div> in your HTML and setting the style in your style sheet. This would work fine in WordPress, except for the fact that the id attribute will be stripped out when saving the post.






