|
-
May 23rd, 2004, 08:05 PM
#1
Thread Starter
Ex-Super Mod'rater
Using the slash in a BR tag
I've seen this used quite a bit:
And when i put my code though a HTML validator it came up with loads of errors that were something about .net something or other, sorry I can't remember the exact error. Either way does anyone know when your meant to use the slash in this way? is it just meant for ASP.NET or something .
Thanx
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 24th, 2004, 01:07 AM
#2
The "<br />" tag (note lowcase tag name) is the proper way of writing it and it is mandatory it is done in this way in XHTML.
Where as most tags such as <a> have a terminating </a> tag the <br /> tag does not. Appending the "/" at the end signifies the tag has no end tag. This is also true for the <img> tag which must also contain an alt attritbute in XHTML and "<meta>" tags and any other tag which has no closing tag.
You should code your HTML to XHTML standard as it is replacing HTML 4 which will become dprecated in time. Anyway here's the specification which lists all the differences:
http://www.w3.org/TR/xhtml1/#diffs
-
May 24th, 2004, 02:16 AM
#3
And only if browsers would get strict about that, so would we. A quagmire, in some ways.
-
May 24th, 2004, 08:15 AM
#4
Thread Starter
Ex-Super Mod'rater
Bit XHTML only lets you use lower case why whats wrong with upper case, I preffer upper case becuase mit lets you see the tags easily
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 24th, 2004, 08:19 AM
#5
Originally posted by Electroman
Bit XHTML only lets you use lower case why whats wrong with upper case, I preffer upper case becuase mit lets you see the tags easily
Its not all that bad. Just type everything else in upper case.
-
May 24th, 2004, 08:38 AM
#6
Thread Starter
Ex-Super Mod'rater
Posted by visualAd
Its not all that bad. Just type everything else in upper case.

But they haven't even used the lower case tags for anything, whats wrong with leaving it how it was and let the tags be case insensitive. .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 24th, 2004, 08:44 AM
#7
A bit more on the subject.
<br/> tag usage is sued for any other tag in which you will have no children or other data inside of it. Like an img tag
<img href="http://"/>
it is basically just like <img href="http://"></img> but since nothing would ever go between the opening and closing tag, you just use the 1 tag with the slash.
And there is nothing 'wrong' with upper case, its just that xhtml is case sensitive and they choose lower case like is used in other case sensitive web standards like javascript.
-
May 24th, 2004, 09:32 AM
#8
Originally posted by Cander
like is used in other case sensitive web standards like javascript.
Choosing lower case instead of making it mixed case (like Javascript) makes it a lot less complicated.
I don't like upper case tags though. I've always used lower case. I think it makes it look tidier - and you don't have to keep turning the CAPS LOCK key on and off or hold down shift.
-
May 24th, 2004, 09:38 AM
#9
All uppercase would remind me of COBOL.
<shudder>
When I said javascript being lowercase, I was referring to built in functions and keywords. All the ones I have eveer used are all lower case.
-
May 24th, 2004, 10:39 AM
#10
Frenzied Member
Originally posted by Cander
All the ones I have eveer used are all lower case.
Math.round()
abcd.charCodeAt()
getElementById()
Those are just a few of very many.
Although, yes it is case sensitive.
Last edited by Acidic; May 24th, 2004 at 10:58 AM.
-
May 24th, 2004, 10:55 AM
#11
ehh.Ive never seen those those myself. 
Nevermind.
<kick in the pants>
-
May 26th, 2004, 12:21 AM
#12
.readOnly
I tore my hair out over that one.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|