To Self-Close the BR or Not to Close the BR
-
Trick question! Neither. Just found this:
</br>
:doh: And, no, there was not an opening BR. Just a long list of anchor tags separated by this new form of BR tag.
Driven to the ARMs by x86.
-
Trick question! Neither. Just found this:
</br>
:doh: And, no, there was not an opening BR. Just a long list of anchor tags separated by this new form of BR tag.
Driven to the ARMs by x86.
-
Trick question! Neither. Just found this:
</br>
:doh: And, no, there was not an opening BR. Just a long list of anchor tags separated by this new form of BR tag.
Driven to the ARMs by x86.
Oh, it still works when omitting the opening tag? Cool, then I can omit that one in my code and have faster page loading!
Jeroen De Dauw (blog | Twitter | Identi.ca)
-
Trick question! Neither. Just found this:
</br>
:doh: And, no, there was not an opening BR. Just a long list of anchor tags separated by this new form of BR tag.
Driven to the ARMs by x86.
Burning
idges, obviously. Seriously, what is the world coming to????? (P.S. and shouldn't he have been usingor
- or...) -- Modified Sunday, July 17, 2011 3:28 AM
-
Burning
idges, obviously. Seriously, what is the world coming to????? (P.S. and shouldn't he have been usingor
- or...) -- Modified Sunday, July 17, 2011 3:28 AM
another one that I have seen is
< p >
and use styles to make it work like``< p >
is because I couldn't get the tag to show until I put spaces in it, even though I put it in code tags -
another one that I have seen is
< p >
and use styles to make it work like``< p >
is because I couldn't get the tag to show until I put spaces in it, even though I put it in code tags<br /> is correct and is required for XHTML. For other HTML versions, there is no closing marker. In other words, there is never a </br> tag, since the BR element cannot contain anything. And if you are using something called "Microsoft HTML", then get off my Internet! :-)
Narf.
-
<br /> is correct and is required for XHTML. For other HTML versions, there is no closing marker. In other words, there is never a </br> tag, since the BR element cannot contain anything. And if you are using something called "Microsoft HTML", then get off my Internet! :-)
Narf.
-
another one that I have seen is
< p >
and use styles to make it work like``< p >
is because I couldn't get the tag to show until I put spaces in it, even though I put it in code tagsThere is a semantic difference between <p> (or other similar elements like <pre> and <dd>) and <br> (and I don't just mean that one is a container tag and one is a separator). It's not just a matter of (ab)using styles to make one look like the other. A paragraph is one group of related text, which may have explicit line breaks (<br> or, if being XHTML compliant, <br/>) within it. <br> shouldn't be used to split paragraphs, any more than <p> should be used to cause an in-paragraph line break, even if you can mess with the styles so that is the appearance. (An exception would be code listings where it's usual to run the whole thing inside one <pre>, even though one could logically argue that it should be one per method.)