How to include videos (or other html elements) in a html page output by plotly?

I am using plotly to generate some plots which of course are output as html pages.

I would like to add some videos next to the plot, in order to show where the data of the plot comes from.

Is this possible?

If this is not possible, is there a way to insert html elements in the output so as to at least have a link to the said video in order to open it externally?

Thanks

Hi @Kansai and welcome to the community !

I don’t think you can add video to a graph exported in html format. You may make use of Dash for that.

But YES Plotly graphs supports subset of HTML tags to do things like newline <br></br>, bold <b></b>, italics <i></i>, and hyperlinks <a href=’…’></a>

So you can add a hyperlink as an annotation on your graph or on the axis labels.
For eg - xaxis_title="Data Source <br> <a href='https://example.com'>