FANDOM


  • I've seen in the past somewhere on Wikia that <br /> is preferred over <br> or <br/>. Does anyone know where this is at? I can't recall the specific reason(s) for this preference, but I know I've seen it here somewhere (of course I can't find it - search is useless).

      Loading editor
    • The space before the / was preferred once upon a time, because prior to Netscape Navigator 4.0, browsers did not recognize the / as a separate token. They would interpret <br/> as a br/ tag instead of a br tag with a /. Since there is no such thing as a br/ tag, the browser would throw an error.

      Since it's highly unlikely that anyone is still using a Netscape Navigator, let alone a version prior to 4.0, I prefer no space before /.

        Loading editor
    • Technically speaking, the slash version is preferred in general, but all the above are rendered the same on medaiwiki and I strongly doubt that wikia changed that.

      I prefer the one without the slash because it is most compact and thus easier to read.

        Loading editor
    • There is no particular reason for spacing in a br tag, mostly just personal preference. I tend to use <br /> purely for readability, rather than for compatibility reasons. Of course there are users who needlessly obsess over the formatting of the br tag and go on crusades replacing them for no reason at all, but all 3 variants work the same.

        Loading editor
    • While I appreciate the posts, no one actually answered the question. The post edit I seen in the past, which I believe was in an article, offered at least one reason for using the spaced version (it was either here on CC or the portability wiki). It may have been Saftzie's reason, but I wanted to reevaluate the reason. Guess I'll paw through more pages.

        Loading editor
    • I remember one such post. It was probably either in a technical update or in one of the many threads or blogs discussing portable infoboxes. Someone complained that portable infoboxes didn't like (prevented it from working) <br />, and it was noted that it is this way because they (wikia) use an XML parser to validate the portable infobox syntax. Later on wikia changed their portable infobox code to accept both variations.

      P.S. You might want to look through your contributions in the future, that's how I found the link above. 

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message