Text box


Does anyone how to put a text input box that inputs some text from the user?
I learned HTML but there was no mention of how to put a fancy text input box.


you need to use another language to achieve this . it depends what is your goal, but you should read about php, databases , or javascript.

html does not operates on variables.
at the beginning create the html form ,and pass argument POST in method argument.
if you want to do some additional action from different file AFTER you press the submit button, place the additional file location in action method.

simple html form :smile

< form method="POST" action="" >
< input type="text" name="field" >
< Input type="submit" name="send" value="send" >
</ form>

echo "Hi,".$POST['field'];

this code will store the data of input as long as you write something new to it, or you refresh the page. if u want to store it longer , you need to place it somewhere, in a file , database, cookie, whatever...


Ohk! I learnt html completely so I was a bit confused when I saw this code.
Actualy the code I saw was:-

< form name="checkListForm">
< input type="text" name="checkListItem"/>
< /form>
Do u know about it?
Is this php or html?


a form (<form></form>) is html, but you can use jquery to get the value of user input:

<!doctype html>
<html lang="en">
  <meta charset="utf-8">
  <title>val demo</title>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<input type="text" id="demo"><input type="button" value="click me" id="click">

this is super simple, i made a button, which if clicked calls a function, which alerts the value from the input text field.


i learnt the html lesson completely but there was no mention of < form> elements or < input>. Did they skip it perhaps??


No, you didn't. There is no mention of it in the html + css track, doesn't mean they don't exist. The html + css course here on CC is just the basics, input and form are no part of it. But since this question was asked in the jquery section, i gave a jquery answer


Thats what i sed, Codeacademy has skiped it in the html+CSS section. Is there any other language where this code is taught in codeacademy?


web form tutorial


Thanks guys I searched it in MDN and got my answers for form and input.
Thanks for the help guys