The HTML <input type="hidden"> element is used to store hidden data in a form that is not visible to users. It is commonly used to send additional information during form submission.
- Used to store hidden form data that is not displayed on the webpage.
- Created using <input type="hidden"> inside a form.
- Supports attributes like name, value, and id.
Syntax:
<input type="hidden"> Example: Demonstrates the use of HTML <input type="hidden"> element.
<!DOCTYPE html>
<html>
<head>
<title>
HTML Input Type Hidden
</title>
</head>
<body>
<h2>HTML <input type="hidden"></h2>
<form action="#">
<input type="hidden" id="myFile" value="1234">
<label for="heading">Enter Heading:</label><br>
<input type="text" name="heading" id="heading">
<br><br>
<label for="content">Enter Paragraph:</label><br>
<textarea name="content" id="content"></textarea>
<br><br>
<label for="content">Enter Meta Description:</label><br>
<textarea name="content" id="content"></textarea>
<br><br>
<input type="submit" value="Create Post">
</form>
</body>
</html>