<!DOCTYPE html>
<html style="width: 50%;">
<body onload="document.documentElement.dir = 'rtl'">
<div style="background: green; height: 10em;"></div>
</body>
</html>