Paragraph tag does not have "value" attribute like input tags.
You can use "textContent" below is an example code on how to use it.
<!--
<!DOCTYPE html>
<html>
<head>
<title>Javascript Example</title>
<script type="text/javascript">
function changeText()
{
let text_value = document.getElementById("input_box").value;
document.getElementById("text").textContent = text_value;
}
</script>
</head>
<body>
<p id="text">You will see the changed text here<br/></p>
<input type="text" name="input_box" id="input_box">
<button type="button" onclick="changeText();">CHANGE TEXT</button>
</body>
</html>
function changeText will take the value from input and sets it into paragraph tag. You may run the code in your browser for better understanding.
Warning: Do not use innerHTML for this purpose, it may seem to work but inputs like
XSS
may lead cross site scripting vulnerability.