Although you can refer to some objects easily using the DOM (e.g. window.document.body) there is an easier way to identify any HTML element in the BODY. First give the element an id and then use getElementById. Put this in the BODY:
<p id="first">This is the first paragraph and <span onmouseover="fred();" style="color:red;">you should hover here</span>.</p>
<p id="second">This is the second paragraph.</p>
Now you can replace all the existing code in your function (fred()) with this:
window.document.getElementById('first').style.fontSize="5px";
window.document.getElementById('second').style.fontSize="40px";
As practice create a few functions triggered by different parts of the text. Have one change the whole document and the others individual bits in different ways. Combine what you have learned on the last few pages.



