+ 4
can a html take input
html can take input from user
2 Antworten
+ 8
HTML can take take input... But the input data is processed by another languages(js, php)
Take input as
<input type="text" />
//</input> is not mandatory to write
This will create a simple input field
But for usage of data the field should be specific,
So
<input type="text" id="name"/>
Now this can be specifically used in Js or php using their syntax...for that you will have to learn JS or PHP
refer for more
HTML5 Forms, Part 1
https://www.sololearn.com/learn/HTML/2216/
HTML5 Forms, Part 2
https://www.sololearn.com/learn/HTML/2217/
+ 2
HTML itself can't take user input, but JavaScript definitely can. To set a variable in JavaScript to equal the result of user input, just set a var to the function prompt():
var x = prompt("Enter a word");
From there you can do whatever you want with it.
I would suggest that after you learn HTML that you learn CSS and JavaScript just to understand how to make a pretty decent website.