Forum Moderators: open

Message Too Old, No Replies

html form syntax

html form syntax

         

escocia1

8:45 pm on Jan 29, 2002 (gmt 0)



are there 2 possibilities for the following code?

<input type=text name="name">

or

<input type="text" name="name">

With or without the quotation marks?

both seem to work on the surface but maybe it causes problems elsewhere?

txbakers

8:50 pm on Jan 29, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You just opened up a BIG discussion.

old style HTML will work without the quotes.

Validated HTML will need the quotes.

XHTML - the new standard coming soon will absolutely require the quotes.

It's up to you at this point, but others will weigh in here. I always use the quotes.

wardbekker

8:58 pm on Jan 29, 2002 (gmt 0)

10+ Year Member



Using quotes is good practice. Nobody will notice it although ;-)

electro

9:17 pm on Jan 29, 2002 (gmt 0)

10+ Year Member



Just had to grapple with this one myself. I have a "search google" box on one of my sites, but the code that Google give you to put in your site doesn't validate. I ended up just putting quotes round everything that needed it, got rid of the <centre> tag, and it validates now.

I know the reason that Google don't have validated code on their page (bandwidth), but perhaps they could give us valid code for this function, and let the designer/ programmer decide whether to leave out the quotes or not.