Why does the editor wrap my content in <p> tags?


#1

The editor strives to produce markup that is both valid and semantic. The use of paragraph tags is essential to this objective, despite its controversy. To better understand why paragraph tags are important from a technical perspective, refer to the article Why P Tags Are Your Friends.

How do I prevent the gaps they cause?

You can remove the gap that p elements create by eliminating the margin in your stylesheet:

.editable p {
    margin: 0;
}