User:Davidgothberg/The br tag

&lt;br> or &lt;br />?
As far as I know &lt;br&gt; tags have been part of wikimarkup since long before any other HTML tags were allowed in MediaWiki. But MediaWiki was updated to also understand some year ago so that it would be easier to copy and paste text from other free sources without having to modify each br tag in those texts. Remember that Wikipedia pages use wikimarkup, and then MediaWiki converts that to whatever happens to be the current standard for web page rendering. And today (2009) that happens to be XHTML 1.0 Transitional. Tomorrow it might be something totally different, like PDF. Oh wait, we already do render to PDF for those that want that!

But apart from the background, let's examine this step by step. Which should we use? or ?

Which should we use? or ?

Let's examine this step by step:

1: Writing the XHTML code  without a blank is even against the recommendations of the World Wide Web Consortium, instead it should be written as   since then HTML parsers can understand it too. HTML parsers will simply regard  as a "br" with an unknown parameter "/", while they will regard "br/" as an unknown tag name. So we should definitely not teach people to write, but possibly.

2: The "HTML" codes we use here at Wikipedia are not XHTML markup nor are they HTML markup, instead they are "HTML wikimarkup", since MediaWiki processes them just like wikimarkup.

3: Wikipedia mainly uses wikimarkup. The reason for that is simple: Most people that edit Wikipedia are people who never have made a web page, so they know nothing about HTML, XHTML or CSS. So for them (and even for us old webmaster geeks) it is easier to use wikimarkup.

4: As far as I have seen the documentation for MediaWiki talks about "HTML in wikitext" and never mentions "XHTML in wikitext". Also up until recently all documentation listed  as the code for forced line breaks. But some time ago some XHTML enthusiasts went around and edited a lot of the help pages to show the  or even the.

So which should we use? or ?

Well, let's first ask another question: Which markup should we use for bold text?

I think we all know that the wikimarkup  is the recommended one. Mainly because it is simpler to use, especially for the majority of editors that don't know HTML and CSS.

The same goes for  vs. The HTML wikimarkup  is easier for the majority of editors to use, and it is shorter.

Sure, we have a "teaching opportunity" to teach people to use the, but there is a very high risk that they instead will use the   and that would be a bad thing. And believe it or not, many beginners have problems telling " " and " " apart. So they might even try to use the ...

So again, the  is easier for the majority of editors to use, and it is shorter.

--David Göthberg (talk) 23:13, 14 March 2008 (UTC)


 * Well,  is the correct "HTML wikimarkup". But MediaWiki was updated to also understand   some years ago so that it would be easier to copy and paste text from other free sources without having to modify each br tag in those texts.
 * Remember that wikimarkup should be as easy as possible so that normal people (non-webmasters) can edit Wikipedia. Wikipedia then parses and converts the wikimarkup to whatever is the current standard for web page rendering. And today (2009) that happens to be XHTML 1.0 Transitional. Tomorrow it might be something totally different, like PDF. Oh wait, we already do render to PDF for those that want that!
 * And note that the very similar  all are faulty variants. And the variant   (without space) is not a recommended variant of the   tag, according to the World Wide Web Consortium (W3C), since it breaks older web browsers.
 * So I suggest we stick to the simple wikimarkup  tag and not change all our 18 million pages every time the web standards change.
 * By the way, the "HTML tidy" function in MediaWiki's page rendering fixes some of the other faulty ways to write the br tag when it renders a page, that's why we get away with some variants like.
 * In April 2009 Brion Vibber, lead developer of MediaWiki, said:
 * In my experience XHTML 1.1 and later are a dead end; HTML 5 is where all the action is in browser support development.
 * There’s also no particular advantage for the “strict” DTD variants; good clean code can be written with or without it, but the “strict” deprecations are often arbitrary and require jumping through more hoops to replicate simple features.
 * So in a not too distant future the MediaWiki page renderer might be converting  in wiki code to   in the rendered pages. Again, wikimarkup is not the same thing as rendered page code.
 * --David Göthberg (talk) 09:12, 25 August 2008 (UTC)
 * Updated --David Göthberg (talk) 16:19, 24 October 2009 (UTC)

Image links
Hi X. Today you edited template example. You added " " which made it so that images fed to that template would not be linked. I had to revert your edit.

Most image licenses require author attribution and that the full license text is sent along or linked to. So we have to have links to the image pages where we state the authors name, type of license and link on to the full license text. We may only unlink images that are public domain and with some other licenses. Unlinking other images is illegal (copyright crime) and means the image authors can sue you and/or Wikimedia Foundation and win in most courts in most countries. Sorry about that, copyright is a hassle.

--David Göthberg (talk) 16:56, 28 January 2010 (UTC)


 * "Free" Software licenses like GPL usually don't require that the attribution and license is showed to every end user, but instead only to those that install and run the software. And you might have noticed that during installation such software often show a lot of stuff.
 * In books we know we can first look around the image, if the attribution isn't there, then we look at the first and last pages of the book. Also, the images in books usually are not GFDL or CS-BY-SA, instead the publishers have commercial agreements with the image owners, agreements that allow the books and newspapers etc to use less attribution.
 * The same goes for most commercial web sites: They have (or are at least required by law to have) agreements with the image owners that let them use the images the way they do.
 * While here at Wikipedia we mostly use images with GFDL and CS-BY-SA licenses or similar. We don't have special commercial agreements with the authors who made the images. We don't pay the image authors anything. So we have to obey by the requirement to attribute those authors and make the licenses readily available. If we don't link to the image page it takes specialised technical knowledge to find the image page. Thus that means we are hiding away the attribution and license. Copyright law says we must abide by what the image license says, even if it says we should jump on one leg and scream "I am a monkey", or we may not use the image. So if we don't like the license, then our only other option is to not use the image at all.
 * --David Göthberg (talk) 18:26, 28 January 2010 (UTC)