I am trying to set up HTML text in a legend of this kind: <div style = 'padding: 0; margin-left: -10px; color: # 7f7f7f '> O-1 <span style =' color: black '> - Kind of zone </span> </div>, but the button render as HTML is only in the text properties. How can I use HTML in a layout legend?


2 Answers 2


There's no "render as html" support for legends in any way (yet). If you want to build a legend with html you need to use a html frame. If you want graphics you could combine a legend without any text with a html frame styled the way you want.


This has been introduced on the last release, QGIS 3.30, as announced here and it is fully functional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.