html input value code example
Example 1: default value input
<input type="text" id="fname" name="fname" value="John">
Example 2: how to get an input in html
<!DOCTYPE html>
<html>
<body>
<head>
<title>HTML Forms</title>
</head>
<p>Add your details:</p>
<form>
Student Name:<br> <input type="text" name="name">
<br>
Student Subject:<br> <input type="text" name="subject">
<br>
Rank:<br> <input type="text" name="rank">
</form>
</body>
</html>
Example 3: js html tag valu
var value = document.getElementById("theInput").innerHTML;