<!DOCTYPE html>
<html>
<body>

<p id="myP" style="font:italic bold 30px Georgia,serif;">This is a paragraph.</p>

<button type="button" onclick="myFunction()">Return font</button>
 
<script>
function myFunction() {
    alert(document.getElementById("myP").style.font);
}
</script>

</body>
</html>