JSFiddle - React, Tailwind, and code Playground
HTML
<div id="loginForm">
<form>
<label>Label 1</label>
<label>Label 2</label>
</form>
</div>
<button id="insert">insert moar</button>
CSS
#loginForm label {
color: #FF0000
}
#loginForm label:nth-child(2n+1) {
color: #8a8a8a;
}
JavaScript
document.getElementById('insert').addEventListener('click', function( event ) {
document.querySelector('#loginForm form').insertAdjacentHTML( 'beforeend', '<label>New Guy!</label>' );
}, false);