HTML Dog
Skip to navigation

File input

For uploading.

HTML

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>File inputs</title>
	<style>
		body {
			font: 100% arial, helvetica, sans-serif;
		}
	
		fieldset {
			padding: 0 1em 1em 1em;
		}
	
		legend {
			padding: 1em;
		}
	</style>
</head>
<body>
	<form action="someplace.php" method="post" enctype="multipart/form-data">
		<fieldset>
			<legend>Upload file</legend>
			<label for="uploadfile">File name: </label>
			<input type="file" name="uploadfile" id="uploadfile">
		</fieldset>
	</form>

	<!-- Link back to HTML Dog: -->
	<p><a href="http://www.htmldog.com/examples/"><img src="http://www.htmldog.com/badge1.gif" alt="HTML Dog"></a></p>
</body>
</html>

Output

View original