i am Nivi i would like to get details on ticket reservation form html source code ..My friend Justin said ticket reservation form html source code will be available here and now i am living at and i last studied int the college and now am doing B.Tech IT i need help on ticket resveration form
Posts: 1,114
Threads: 699
Joined: Sep 2016
<HTML><BODY>
<H1>RESERVATION FORM</H1>
<P>NAME<INPUT TYPE="TEXT" SIZE="20" MAXLENGTH="99" />
<P>AGE<INPUT TYPE="TEXT" SIZE="12" MAXLENGTH="99" />
<P>ADDRESS<INPUT
<TYPE="TEXT" SIZE="42" MAXLENGTH="99" />
<P>EMAIL<INPUT TYPE="TEXT" SIZE="30" MAXLENGTH="99" />
<P>TELEPHONE<INPUT TYPE="TEXT" SIZE="10" MAXLENGTH="99" />
<P>SELECT YOUR
BERTH
<SELECT NAME="CHOICES" SIZE="3">
<OPTION>TATKAL</OPTION>
<OPTION>LADIES</OPTION>
<OPTION>GENRAL</OPTION>
</SELECT></P>
<P>CITY<SELECT naME="CITY"><OPTION SELECTED>
DELHI</OPTION><OPTION>MUMBAI</OPTION><OPTION>KOLKATA</OPTION><OPTION>CHENNAI</OPTION></p><br><br>
<input type="submit" value="click here to submit" />
<input
type="reset" value="clear this form" /></BODY></HTML>
beginner html form
shareimprove this question
edited Mar 20 '14 at 2:17
asked Mar 18 '14 at 4:00
user38941
2
"What should I do to add attractive looks" - Add a CSS stylesheet – ChrisW Mar 18 '14 at 5:14
2
"What should I do to upload the input data somewhere, so that I could read it?"- Put the form on a web server, so that users can load the form in their web browser using HTTP. You'll also need a <form> element in the page. – ChrisW Mar 18 '14 at 5:17
add a comment
2 Answers
active oldest votes
up vote
11
down vote
The most obvious mistake — which makes your code malformed HTML — is the extra < before TYPE:
<P>ADDRESS<INPUT
<TYPE="TEXT" … />
The next biggest issue, in my opinion, is that your <P> tags aren't consistently being closed. Only in the earliest days of HTML was it acceptable to use an unclosed <P> as a line break. These days, it's generally accepted that paragraphs should lie between <P> and </P>.
The next thing you should do is to add a doctype declaration at the very beginning, which tells the browser which version of the HTML standard is being used. Without the doctype, browsers will interpret the document in slightly non-standard ways, especially if you use CSS. If you have no preference for any particular doctype, use HTML5:
<!DOCTYPE html>
<html>
...
</html>
Once you have declared a doctype, you can then run the code through an HTML validator, which will tell you everything else that is syntactially incorrect. For example, it's OK to say
<option selected="selected">...</option
or
<option selected>...</option>
but not
<option selected="true">
HTML is case-insensitive, but you should choose either uppercase or lowercase consistently anyway. Since XHTML mandates lowercase, I recommend using lowercase everywhere too, even if you are using HTML instead of XHTML.