Adding a border to plotly graph title

I am trying to put a border around a subheader of my plotly graph. I am trying the code below which works for my font size but it’s not working for a border. Any one have any tips?

            title=f'<span style="font-size: 20px">{title}</span>'
                  f'<br><span style="font-size:16px; border:solid black;"><b>Mean:</b> {y.mean():.2f} <b>Median:</b> {y.median():.2f} '
                  f'<b>Standard Deviation:</b> {y.std():.2f}</span>')

HI @bpolasek ,

I think this is similar to this topic - the style attributes affecting the text directly such as font-family, font-size… are processed but you can’t use all html tags, but I’m not sure :wink:

Gotcha. Yeah I’ve found not all of them work. Was hoping there was another way around it without having to mess with annotations. Thanks!

If you find a way, please let me know :slight_smile:

1 Like