# How to render markdown in html instead of react?

**URL:** <https://forum.freecodecamp.org/t/how-to-render-markdown-in-html-instead-of-react/354640>\
**Category:** General\
**Created:** [February 29, 2020, 8:13pm UTC](https://forum.freecodecamp.org/t/how-to-render-markdown-in-html-instead-of-react/354640 "2020-02-29T20:13:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dopamine](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@Dopamine](https://forum.freecodecamp.org/u/Dopamine)\
**Post date:** [February 29, 2020, 8:13pm UTC](https://forum.freecodecamp.org/t/how-to-render-markdown-in-html-instead-of-react/354640/1 "2020-02-29T20:13:15Z")

</div>

I understand that you use dangerouslySetInnerHTML for react;  
and marked(’# Title’) in html, but in HTML, it only renders if there is only one line.

If I do more than one; e.g. marked(’ # Welcome to my React Markdown Previewer!

## This is a sub-heading…

### And here’s some other cool stuff:

Heres some code, `<div></div>` , between 2 backticks.’);

nothing renders at all. I’ve been searching for over 7 hours now trying to find the correct code for HTML to render markdown text; I want to be able render in HTML instead of react

---

<div class="post-metadata">

**Author:** ![caleb-mabry](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/caleb-mabry/32/134224_2.png) [@caleb-mabry](https://forum.freecodecamp.org/u/caleb-mabry)\
**Post date:** [February 29, 2020, 9:54pm UTC](https://forum.freecodecamp.org/t/how-to-render-markdown-in-html-instead-of-react/354640/2 "2020-02-29T21:54:46Z")

</div>

I’m not sure that I understand exaclty what issue you are having. Do you think you could post a link to your Codepen? That might make it easier for others to see what you might need help with.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 7:34pm UTC](https://forum.freecodecamp.org/t/how-to-render-markdown-in-html-instead-of-react/354640/3 "2021-06-01T19:34:58Z")

</div>

Closed on June 1, 2021, 7:34pm UTC


