PDA

View Full Version : <... width="ladida"... / >?



MTsoul
November 24th, 2003, 12:29 AM
< fajdlfkj / >
is that some sort of tag? /> i see that on almost all sources of dynamically generated pages..what is it?

David
November 24th, 2003, 12:42 AM
I assume you mean " /> "

It closes the tag. eg: <script> blah, blah, blah <script/>

MTsoul
November 24th, 2003, 12:43 AM
it's like the samething with </script>?

David
November 24th, 2003, 12:47 AM
Yeah, sorry </script> was what i meant.

MTsoul
November 24th, 2003, 12:49 AM
but this is what i'm saying:

<font color="black" size="5" />
------------------------------------/\--!!
what's with />? some dynamic scripts are always like that.

APDesign
November 24th, 2003, 01:14 AM
tags that don't reqiure something inbetween stuff can be closed in itself. so you if you have a tag like "lkjdsf" that is just like this <lkjdsf></lkjdsf> instead of typing it like that, you can type it like this <lkjdsf/> see? Since there is nothing inbetween them, there doesnt need to be a begin tag and end tag, you can just make it one tag. To recap
<lkjdsf></lkjdsf> is the same as <lkjdsf />

MTsoul
November 24th, 2003, 01:16 AM
but what would be the use of doing that if there is no use for that tag?

thoriphes
November 24th, 2003, 02:16 AM
That's an XML tag, you guys.

Voetsjoeba
November 24th, 2003, 02:00 PM
Yeah, NJS told me it was something like that ... I thought it was XHTML 1.0.

lostinbeta
November 24th, 2003, 02:48 PM
It is XHTML. Which is a stricter form of HTML.

λ
November 24th, 2003, 03:54 PM
There are tags with uses like this. Take line break(<br>) for example.

You would normally write:

<br>

But in XML based languages(like XHTML) that is seen as an opening tag, and opening tags must have closing tags. So instead you must write:

<br></br>

The shorthand form for this is

<br/>

but Netscape 4 and other older browsers don't recognize this, so we must put a space before the ending slash.

<br />

img and a few other XHTML tags do this as well.

c!rYx
November 24th, 2003, 06:18 PM
True true, it's just a clean way of writing html, even if it is not necessary...