When I set the border for HTML and body tags then observed that the border is for the entire viewport of the browser. The same is the case when it is positioned, relative.
But, when I make it positioned as absolute, then the border is applied only if I set height and width explicitly to HTML and body tags. Otherwise, it is displayed as a small dot as no dimensions are specified.
Not able to understand why this difference when we make it as absolute positioned.
Code:
* {margin:0; padding:0;}
html {border: 1px solid green;}
body {position: absolute; border: 1px solid yellow; width: 500px; height: 500px;}
<html>
<head>
</head>
<body>
</body>
</html>