why use fwd slash before closing of tag? " <tag /> "

A

Aniais

I encounter this syntax occasionally, more often when HTML is mixed with PHP
,etc.

can anyone explain or justify the use of fwd slash at the ending of tags?

would it screw up html in some cases?

thanks!

anais
 
V

Vince Morgan

Aniais said:
I encounter this syntax occasionally, more often when HTML is mixed with PHP
,etc.

can anyone explain or justify the use of fwd slash at the ending of tags?

would it screw up html in some cases?

thanks!

anais

In XHTML tags must be closed. So, tags such as <BR> which are not normaly
closed in HTML become <br/>. XHTML tags are all lower case too.
HTH
Vince Morgan
 
A

Andy Dingley

Aniais said:
I encounter this syntax occasionally, more often when HTML is mixed with PHP

It's an XHTML feature. It's not needed for HTML and although it's
unlikely to cause much practical trouble, it's strictly wrong to use
it.

Don't use XHTML. Certainly don't use XHTML unless you're fairly expert
in its subtleties. These are not simple!

If you want to know more, searching this group or c.i.w.a.h for
"appendix c" will probably show some more detailed discussion of it.
 
T

Toby Inkster

Dylan said:
Which isn't to say that all HTML tags are upper-case, just that it
doesn't matter whether HTML is written in upper, lower or a mixture of
cases.

Except <bLOCkquOte> -- it's important that <bLOCkquOte> is written
exactly that way.
 
J

Joe (GKF)

usenet200611 said:
Except <bLOCkquOte> -- it's important that <bLOCkquOte> is written
exactly that way.
Only if you're using it to provide an indent on stuff that isn't a
quote..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top