JSFiddle - React, Tailwind, and code Playground
HTML
<div id="output-text">
hello folks
</div><br>
<label for="input-font">
Font
</label><br>
<select id="input-font" class="input" onchange="changeFont()" size="2">
<option selected ="selected" value="Helvetica">Helvetica</option>
<option value="Arial">Arial</option>
<option value="Times">Times</option>
</select>
JavaScript
function changeFont() {
var myselect = document.getElementById("input-font");
var font = myselect.options[myselect.selectedIndex].value;
document.getElementById("output-text").style.fontFamily = font;
}