|
-
May 21st, 2012, 11:04 PM
#1
Thread Starter
Fanatic Member
why we use forward slash with br tag
Hi. I've seen this practice in video tutorials as well as on online website that in single tags like br, a forward slash is used with it like this:
<br />
Why do we used this forward slash, is it since old versions or its only in new versions of html?
-
May 22nd, 2012, 01:47 AM
#2
Re: why we use forward slash with br tag
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
May 22nd, 2012, 07:24 PM
#3
Re: why we use forward slash with br tag
In XML, <x/> is equivalent to <x></x>.
In HTML, the br element has no closing tag, so only <br> is necessary. However, people often write <br /> for readability's sake, and for consistency with XML, which always requires closing tags.
-
May 22nd, 2012, 08:26 PM
#4
Re: why we use forward slash with br tag
It's also to maintain standards with XHTML doc formats.
-tg
-
May 23rd, 2012, 10:22 PM
#5
Thread Starter
Fanatic Member
Re: why we use forward slash with br tag
Thank you very much all of you my teachers and brothers.
One more related thing which i asked in my question as well, that has it always been a practice to put forward slash with br <br /> or its a new practice?
Last edited by ADQUSIT; May 23rd, 2012 at 10:26 PM.
-
May 24th, 2012, 07:21 AM
#6
Re: why we use forward slash with br tag
No, it hasn't always been that way but it isn't new either: I've been doing that for 10+ years...
-tg
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
|