html css js rotate div code example Example: rotate a div using javascript div.style.tranform = 'rotate(' + angleInDegrees + 'deg);';