I've been trying to make a program that automatically writes two-column algebraic and geometric proofs. I'm sure this has already been done, but I want to do it anyway. I am somewhat inexperienced with HTML and JavaScript (I've mainly been trying to learn from online resources) and I'm having trouble getting a variable to print. Here's the code that I've written so far, I want "x" to be the user input of what is "given" in the desired problem. I will later have the program check if the format of the input is valid and also make the table expand by one for each step that it decides it needs to take to get closer to the statement that it is trying to prove.
<HTML>
<body>
<font size="5">
<p align="center">
<p1>Insert Given:</p1>
<div align="center"; id="Input1">
<form id='user-input'>
<input type='text' id='given' placeholder='Given Information'></input>
</form>
<p2>Insert Statement<br>to Prove:</p2>
<br>
<div align="center"; id="Input2">
<form id='user-input'>
<input type='text' id='prove' placeholder='Statement to Prove'></input>
</form>
<button id='submit' onClick="edit()">Submit</button>
<print><var ="x"></var></print>
<script>
<function> edit()
{
x = document.getElementById('Input1').value;
y = document.getElementById('Input2').value;
}
</function>
</script>
<br>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 5px;
}
</style>
</head>
<body>
<table style="width:100%">
<col Width="15">
<col Width="300">
<col Width="500">
<tr>
<th>Step Number</th>
<th>Step</th>
<th>Explaination</th>
</tr>
<tr>
<td>1</td>
<td><var="x"></var></td>
<td>Given</td>
</table>
</div>
</body>
</html>
Anything you all have on how to get this to work (preferably without extremely altering the format or switching programming languages) would be awesome, and any tips you guys have for the rest of my project would be great too. I apologize if this is a newbie question.