<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Christian,</p>
<p>You probably don't do anything wrong. It is just not supported (yet).</p>
<p>Here is the subset of HTML that should work:</p>
<ul>
<li>font-color (<a href="https://www.qgis.org/en/site/forusers/visualchangelog314/index.html#feature-respect-html-colors-in-labels">https://www.qgis.org/en/site/forusers/visualchangelog314/index.html#feature-respect-html-colors-in-labels</a>)</li>
<li>font-familiy (<a href="https://www.qgis.org/en/site/forusers/visualchangelog328/index.html#feature-add-support-for-html-bold-italic-font-size-and-font-family-to-labelling">https://www.qgis.org/en/site/forusers/visualchangelog328/index.html#feature-add-support-for-html-bold-italic-font-size-and-font-family-to-labelling</a> )</li>
<li>font-size</li>
<li>bold</li>
<li>italic</li>
</ul>
<p>This is a really small subset of HTML that is supported until now, because many HTML formatting options have an impact on text geometries and need to be taken into account in the label engine (e.g for overlap tests, etc.)</p>
<p>If you need this implemented, please ask a developer for a quote to get it implemented. Nyall Dawson (<a href="https://north-road.com/">https://north-road.com/</a>) did most of the work here. He could be asked.</p>
<p>Hope this helps,</p>
<p>Andreas</p>
<p id="reply-intro">On 2023-01-05 14:32, Bodamer, Christian via QGIS-User wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<style type="text/css">@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}

#replybody1 p.v1MsoNormal, #replybody1 li.v1MsoNormal, #replybody1 div.v1MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
#replybody1 .v1MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
#replybody1 div.v1WordSection1
        {page: unset;}</style>
<div lang="DE" style="word-wrap: break-word;">
<div class="v1WordSection1">
<p class="v1MsoNormal"><span>Hello list,</span></p>
<p class="v1MsoNormal"><span> </span></p>
<p class="v1MsoNormal"><span>wish you a happy NEW YEAR!</span></p>
<p class="v1MsoNormal"><span> </span></p>
<p class="v1MsoNormal"><span>I like to label with two columns. The secound column sholud be subscript. I activate HTML Formating and use the following code in the Value field:</span></p>
<p class="v1MsoNormal"><span> </span></p>
<p class="v1MsoNormal"><span>format(</span></p>
<p class="v1MsoNormal"><span>  '<span>%1</span> Sub<span style="vertical-align:sub">%2</span>',</span></p>
<p class="v1MsoNormal"><span>   "column1" ,</span></p>
<p class="v1MsoNormal"><span>   "column2" </span></p>
<p class="v1MsoNormal"><span>)</span></p>
<p class="v1MsoNormal"><span> </span></p>
<p class="v1MsoNormal"><span>The text of column2 is displayed but not subscript. Also <sub>%2</sub> doesn't work. </span></p>
<p class="v1MsoNormal"><span>Changing the color with style="color:red" works. I don't see the mistake. </span></p>
<p class="v1MsoNormal"><span> </span></p>
<p class="v1MsoNormal"><span>Does someone has an idea?</span></p>
<p class="v1MsoNormal"><span> </span></p>
<p class="v1MsoNormal">Christian</p>
</div>
<p><br /></p>
<p style="color: #195eae;">+++ Verkehrsmeldungen und alles rund um die Autobahn finden Sie in unserer App:<a style="color: #195eae;" href="https://www.autobahn.de/app" target="_blank" rel="noopener noreferrer"> Autobahn.de/app</a> +++</p>
<p><br /></p>
<p>Die Autobahn GmbH des Bundes<br />Rechtsform GmbH<br />Sitz Heidestraße 15 · 10557 Berlin · AG Charlottenburg · HRB 200131 B<br />Geschäftsführung Stephan Krenz, Gunther Adler, Anne Rethmann<br />Aufsichtsratsvorsitzender Oliver Luksic<br /> <br />Vertraulichkeitshinweis<br />Diese Nachricht und jeder etwaig uebermittelte Anhang beinhalten vertrauliche Informationen und sind nur fuer die Personen oder Unternehmen bestimmt, an welche sie tatsaechlich gerichtet sind. Sollten Sie nicht der bestimmungsgemaesse Empfaenger sein, weisen wir Sie darauf hin, dass die Verbreitung, das (auch teilweise) Kopieren sowie der Gebrauch der empfangenen E-Mail und der darin enthaltenen Informationen verboten sind und gegebenenfalls Schadensersatzpflichten ausloesen können. Sollten Sie diese Nachricht aufgrund eines Uebermittlungsfehlers erhalten haben, bitten wir Sie, den Absender unverzueglich hiervon in Kenntnis zu setzen.<br />Sicherheitswarnung: Bitte beachten Sie, dass das Internet kein sicheres Kommunikationsmedium ist. Obwohl wir im Rahmen unseres Qualitaetsmanagements und der gebotenen Sorgfalt Schritte eingeleitet haben, um einen Computervirenbefall weitestgehend zu verhindern, koennen wir wegen der Natur des Internet das Risiko eines Computervirenbefalls dieser E-Mail nicht ausschliessen.<br /> <br />Confidentiality note<br />This notice and any attachments which are transmitted contain confidential information and are intended only for the persons or companies to whom they are actually addressed. If you are not the intended recipient, please note that the distribution, copying (even partial) and use of the received e-mail and the information contained in the e-mail are prohibited and may result in a possible liability for damages. Should you have received this message due to a transmission error, we ask you to inform the sender immediately.<br />Safety warning: Please note that the Internet is not a safe means of communication or form of media. Although we are continuously increasing our due care of preventing virus attacks as a part of our Quality Management, we are not able to fully prevent virus attacks as a result of the nature of the Internet.</p>
<p><br /></p>
<p>Hinweis zur Datenverarbeitung / Link to data protection policy: <a style="color: #195eae;" href="https://www.autobahn.de/datenschutz" target="_blank" rel="noopener noreferrer"> https://www.autobahn.de/datenschutz</a></p>
</div>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">_______________________________________________<br />QGIS-User mailing list<br /><a href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></div>
</blockquote>
<p><br /></p>

</body></html>