html inline style img hover 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>');