Topic: option tag has to be closed??? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=9662" title="Pages that link to Topic: option tag has to be closed??? (Page 1 of 1)" rel="nofollow" >Topic: option tag has to be closed??? <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-22-2003 00:03

Hi, guys. How are you?
Could I aks you something, please?
I just wonder if I must close option tag or not.
A lot of book seem not close this tag.
Something like:

<select>
<option>A
<option>B
<option>C
</select>

But I personally thought:

<select>
<option>A</option>
<option>B</option>
<option>C</option>
</select>

This is right. Becaue in XHTML, all tag must be closed, isn't it???
Am I right? would you give me your comments, please?



Hiroki Kozai

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

posted posted 07-22-2003 00:04

In XHTML all tags must be closed. So if you're using XHTML, then yes.

If you're using HTML though, you don't need to close it.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 07-22-2003 00:06

Thanks, mate.
Have a good day.


Hiroki Kozai

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-22-2003 06:19

And since XHTML replaced HTML, yes. Close all tags. ALL TAGS.

wisenut
Obsessive-Compulsive (I) Inmate

From: somewhere out there
Insane since: Aug 2003

posted posted 08-06-2003 12:13

Although you don't strictly need the closing </OPTION> tag, it is good practice to put it in your code. Some browsers (not IE, but some versions of Netscape and others) are particular about the way they display things, and if they don't come across the closing tags for HTML elements, your code may well appear rather strangely... all depends how browser-compatible your code needs to be.

If you haven't reached the end of the road and you're not at the start then you must be somewhere in the middle

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 08-06-2003 14:33

Except, of course, as Synax said XHTML *does* require the closing tag, and as Pugzly said XHTML is the next version of HTML....so unless there's some compelling reason for them not to, people should be using XHTML at this point.





Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu