I am very new in learning JavaScript and html and CSS, I am trying to change the size of the all paragraphs in the document object here is my code but I am not getting any change and I noticed that documnet.getElementsByTagName('p') returns an empty object
<html>
<head>
<script>
window.onload=function(){
var paragraphs = document.getElementsByTagName("p");
for(var i = 0; i < paragraphs.length; i++){
paragraphs[i].style.fontSize = '45px';
}
}
</script>
</head>
<body>
<p>helooop</p>
<p>helooop</p>
<p>helooop</p>
<p>helooop</p>
</body>
I don't know where went wrong . Could anyone helps please