Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <h2 id="myH2" style="position:absolute;left:100px;top:150px;">This is a heading</h2> <button type="button" onclick="myFunction()">Return type of position</button> <script> function myFunction() { alert(document.getElementById("myH2").style.position); } </script> </body> </html>