# Serialize to XHTML (e.g. br, hr)

**URL:** <https://discuss.prosemirror.net/t/serialize-to-xhtml-e-g-br-hr/4020>\
**Category:** Uncategorized\
**Created:** [September 1, 2021, 6:11pm UTC](https://discuss.prosemirror.net/t/serialize-to-xhtml-e-g-br-hr/4020 "2021-09-01T18:11:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pojo](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@pojo](https://discuss.prosemirror.net/u/pojo)\
**Post date:** [September 1, 2021, 6:11pm UTC](https://discuss.prosemirror.net/t/serialize-to-xhtml-e-g-br-hr/4020/1 "2021-09-01T18:11:08Z")

</div>

Is it possible to let ProseMirror to output XHTML? I’ve looked at one of the introductory examples and there I see `<hr>`. I’m wondering whether I can make this a self closing tag: `<hr/>`

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.prosemirror.net/user_avatar/discuss.prosemirror.net/marijn/32/15_2.png) [@marijn](https://discuss.prosemirror.net/u/marijn)\
**Post date:** [September 1, 2021, 7:36pm UTC](https://discuss.prosemirror.net/t/serialize-to-xhtml-e-g-br-hr/4020/2 "2021-09-01T19:36:15Z")

</div>

The `DOMSerializer` outputs a DOM tree, not HTML. It shouldn’t be too hard to run a function over that that produces an XHTML string.

---

<div class="post-metadata">

**Author:** ![pojo](https://discuss.prosemirror.net/letter_avatar_proxy/v4/letter/p/c68b51/32.png) [@pojo](https://discuss.prosemirror.net/u/pojo)\
**Post date:** [September 1, 2021, 9:18pm UTC](https://discuss.prosemirror.net/t/serialize-to-xhtml-e-g-br-hr/4020/3 "2021-09-01T21:18:24Z")

</div>

Thanks for the follow up. Let me also check tiptap which I believe have a dedicated function for that.
