# Inserting HTML into Chatbot (Blocks)

**URL:** <https://discuss.huggingface.co/t/inserting-html-into-chatbot-blocks/61126>\
**Category:** 🔒 Gradio\
**Created:** [November 5, 2023, 1:52pm UTC](https://discuss.huggingface.co/t/inserting-html-into-chatbot-blocks/61126 "2023-11-05T13:52:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackmarkt](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/blackmarkt/32/20357_2.png) [@blackmarkt](https://discuss.huggingface.co/u/blackmarkt)\
**Post date:** [November 5, 2023, 1:52pm UTC](https://discuss.huggingface.co/t/inserting-html-into-chatbot-blocks/61126/1 "2023-11-05T13:52:58Z")

</div>

Hi All,

I am creating an AI chatbot interface and the LLM at times responds with HTML that I would like rendered in the Chatbot component. Is there any documentation and/or examples that shows how to accomplish this? My example code is below:

```auto
with gr.Blocks() as demo:
    chatbot = gr.Chatbot(avatar_images=(None, ""),
                         value=[[None, INIT_MSG]],
                         height=1000)
    msg = gr.Textbox(placeholder="Enter text and press enter")
    clear = gr.ClearButton([msg, chatbot])

    def respond(message, chat_history):
        bot_message = AIBot(message)
        time.sleep(0.05)
        return "", chat_history

    msg.submit(respond, [msg, chatbot], [msg, chatbot])

demo.launch()

```

Thank you.

---

<div class="post-metadata">

**Author:** ![dwipper](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/dwipper/32/21750_2.png) [@dwipper](https://discuss.huggingface.co/u/dwipper)\
**Post date:** [November 6, 2023, 11:14pm UTC](https://discuss.huggingface.co/t/inserting-html-into-chatbot-blocks/61126/2 "2023-11-06T23:14:43Z")

</div>

I haven’t done it with the Chatbot, but did do it with the Interface component. There is a HMTL component available: [Gradio HTML Docs](https://www.gradio.app/docs/html)
