JSFiddle - React, Tailwind, and code Playground

HTML

<title>Titel på sidan</title>
<table class="ord1">
<tr><td colspan="3" valign="top"><p class="ord1 ord2 ord3">Text jag vill ha i title</p></td></tr>
<tr><td colspan="2" valign="top"><p class="ord1 ord2 ord4">text</p></td><td valign="top"><p class="ord1 ord2">text</p></td></tr>
<tr><td colspan="3" valign="top"><p class="ord1 ord2" id="ett_id">massa text</p></td></tr>
<tr><td colspan="3" valign="top"><p class="ord1 ord2">resultat från en sak</p></td></tr>
</table>

JavaScript

document.title = document.getElementsByClassName('ord1 ord2 ord3')[0].innerHTML;