I tried:
import gradio as gr
with gr.Blocks(css="footer{display:none !important}") as demo:
answer = gr.Markdown(value='[StackOverflow](https://stackoverflow.com/)', label="Answer")
demo.launch(share=True)
but to my surprise, the label "Answer" doesn't appear in the UI:
I don't have that issue with Textbox:
E.g.,
import gradio as gr
with gr.Blocks(css="footer{display:none !important}") as demo:
answer = gr.Textbox(value='[StackOverflow](https://stackoverflow.com/)', label="Answer")
demo.launch(share=True)
will display the label "Answer" for the textbox:
How can one add a label to a Markdown box in Gradio?
I use Gradio 4.16.0 with Python 3.11.7 on Windows 10.


yuvi posted this great answer on Discord:
Based on that answer, I replaced:
with
which gives: