HiveBrain v1.2.0
Get Started
← Back to all entries
patternhtmlModerate

Reservation Form in HTML

Submitted by: @import:stackexchange-codereview··
0
Viewed 0 times
formreservationhtml

Problem

I am a beginner and I have made a Reservation Form in HTML. I'm pretty sure it will look horrible to any developer out there, but hey, that's why I've posted it.

I'd like a general review of this. I'm especially concerned about the quality and enhancements of this form. What should I do to add attractive looks and to upload the input data somewhere, So that I could read it?


RESERVATION FORM
NAME
AGE
ADDRESS
EMAIL
TELEPHONE
SELECT YOUR 

BERTH

TATKAL
LADIES
GENRAL

CITY 

DELHIMUMBAIKOLKATACHENNAI

Solution

The most obvious mistake — which makes your code malformed HTML — is the extra ` tags aren't consistently being closed. Only in the earliest days of HTML was it acceptable to use an unclosed as a line break. These days, it's generally accepted that paragraphs should lie between and .

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:


    ...


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


or

...


but not



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.

Oddly, your form has no
` tag.

Code Snippets

<P>ADDRESS<INPUT

<TYPE="TEXT" … />
<!DOCTYPE html>
<html>
    ...
</html>
<option selected="selected">...</option
<option selected>...</option>
<option selected="true">

Context

StackExchange Code Review Q#44640, answer score: 12

Revisions (0)

No revisions yet.