+ 4

can a html take input

html can take input from user

30th Jan 2018, 2:24 AM
Shri Santosh
Shri Santosh - avatar
2 Answers
+ 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/
30th Jan 2018, 4:30 AM
Jaydeep Khatri
Jaydeep Khatri - avatar
+ 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.
30th Jan 2018, 2:27 AM
Faisal
Faisal - avatar