element inline style to include hover html css code example
Example: how to apply hover through inline css
document.head.insertAdjacentHTML('beforeend', '<style>#mydiv:hover{color:red;}</style>');
document.head.insertAdjacentHTML('beforeend', '<style>#mydiv:hover{color:red;}</style>');