JSFiddle - React, Tailwind, and code Playground
by Leonid Artemev
HTML
<div class="left" style="position:absolute; font-family: Arial, sans-serif; font-size: 14px; font-kerning: normal; word-wrap: break-word; white-space: pre-line; display: inline-block; -webkit-user-select: text; text-align: left; color: rgb(242, 87, 73); width: 200px; " contenteditable="true"><span style="letter-spacing: 0px;">Первая строка</span>
<i style="letter-spacing: 0px;"><u>Вторая строка</u></i><span style="color:#f25749; "><br><br><br><b>слово</b></span>
</div>
<svg class="left" width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<text y="10" style="fill:blue; font-family: Arial, sans-serif; font-size: 14px; font-kerning: normal; ">
<tspan x="0">Первая строка</tspan>
<tspan x="0" dy="1.2em" style="font-style: italic; text-decoration: underline;">Вторая строка</tspan>
<tspan x="0" dy="3.45em" style="font-weight: bold;">слово</tspan>
</text>
</svg>
<!--*********************************************************************************************************-->
<div class="center" style="position:absolute; font-family: Arial, sans-serif; font-size: 14px; font-kerning: normal; word-wrap: break-word; white-space: pre-line; display: inline-block; -webkit-user-select: text; text-align: center; color: rgb(242, 87, 73); width: 200px;" contenteditable="true"><span style="letter-spacing: 0px;">Первая</span>
<i style="letter-spacing: 0px;"><u>Вторая строка</u></i><span style="color:#f25749; "><br><br><br><b>слово</b></span>
</div>
<svg class="center" width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<text y="10" style="fill:blue; font-family: Arial, sans-serif; font-size: 14px; font-kerning: normal; ">
<tspan text-anchor="middle">
<tspan x="100">Первая</tspan>
</tspan>
<tspan text-anchor="middle">
<tspan x="100" dy="1.2em" style="font-style: italic; text-decoration:...
CSS
svg {
position:absolute;
top:10px;
}
.left{
position:absolute;
left:10px;
}
.center{
position:absolute;
left:200px;
}
.right{
position:absolute;
left:400px;
}