EN
HTML - text input
3
points
In this article, we would like to show you how to create text input element in HTML.
Quick solution:
// ONLINE-RUNNER:browser;
<input type="text" name="input-name" value="Initial value..." />
or just:
// ONLINE-RUNNER:browser;
<input name="input-name" value="Initial value..." />
Practical example
In this section, we use label
to wrap input
for better SEO and user experience (it means the input
is described by the Field name:
).
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<body>
<label>
<span>Field name:</span>
<input type="text" name="input-name" value="Some text ..." />
</label>
</body>
</html>