<html>
<body>
<p id="demo" style="font-weight:bold">This is a paragraph.</p>
<button type="button" onclick="myFunction()">Return font weight</button>
<script>
function myFunction() {
alert(document.getElementById("demo").style.fontWeight);
}
</script>
</body>
<!-- /jsref/tryit.asp?filename=tryjsref_style_fontweight3 Thu, 06 Feb 2025 18:36:39 GMT -->
</html>