Jump to content

Wikipedia:Span tags

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Eequor (talk | contribs) at 23:59, 1 August 2004 (Yes: move Salasks's vote to New votes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Terms and jurisdiction

This poll was previously closed on May 18, 2004. It has been reopened as of August 1, and will continue until September 1 00:00:00 UTC. The results of this poll are not binding, and will only serve to illustrate the views of Wikipedians. Only users who had at least 1 edit on the English Wikipedia prior to August 1, 2004 may vote in this poll.

Summary

The Wikipedia software currently does not allow HTML <span> tags to be embedded in wiki source. Some users have expressed a desire for <span> tags because they would allow certain things to be done that cannot be done currently at all, such as:

  • explicitly setting the CSS style for an inline run of text
  • explicitly setting the language for a run of text (for cases where the rendering differs from language to language)
  • explicitly setting the direction of the txt (LTR or RTL).

Since these things can't be done, users are resorting to using other HTML tags that are not designed for this purpose as workarounds. Enabling <span> tags would not increase the amount of HTML in the wiki text, but simply make the already-existing HTML more correct, and as a result, easier to convert to wiki markup when such markup eventually is implemented.

Requests to the developers to allow <span> tags have been repeatedly denied.

Reference

For reference, all of the following HTML tags are currently permitted on Wikipedia:

  • <b>
  • <big>
  • <blockquote>
  • <br>
  • <caption>
  • <center>
  • <cite>
  • <code>
  • <dd>
  • <div>
  • <dl>
  • <dt>
  • <em>
  • <font>
  • <h1>
  • <h2>
  • <h3>
  • <h4>
  • <h5>
  • <h6>
  • <hr>
  • <i>
  • <li>
  • <ol>
  • <p>
  • <pre>
  • <rb>
  • <rp>
  • <rt>
  • <ruby>
  • <s>
  • <small>
  • <strike>
  • <strong>
  • <sub>
  • <sup>
  • <table>
  • <td>
  • <th>
  • <tr>
  • <tt>
  • <u>
  • <ul>
  • <var>
  • <!-- ... -->

Almost all these tags permit inline CSS styles.

Whilst we're here and looking at them, what does <ruby> do, and should the various <table>-related tags be deprecated now we have the wiki-style table markup? --Phil | Talk 16:58, May 4, 2004 (UTC)
<ruby> and the related tags <rb>, <rp>, <rt> are used for the markup of Ruby text, which is not currently supported in most browsers. See that page for an example of marked-up Ruby (which will likely not be displayed correctly in your browser). Nohat 18:29, 2004 May 4 (UTC)
FWIW IE6 and mozilla can both display simple ruby. not sure about the others but ruby written with proper <rp> tags works well in most browsers.Zeimusu

<span> poll

This poll is to answer the following question:

Should the English Wikipedia enable <span> tags?

This poll is not answer any other question, namely should <div> tags continue to be allowed, or should a new Wiki markup be invented to handle things that <span> tags would allow. This poll is ONLY to answer the question whether or not <span> should be enabled. It should also be noted that is poll is explicitly not about whether or not wiki markup should be implemented to handle things that <span> tags would be able to handle. It is only about whether <span> tags should be enabled until such time as wiki markup is supported to do things that only <span> tags can do. Also note that is poll is not about whether use of <span> tags is to be encouraged by policy; it os only about whether they will be permitted at all, or filtered out by the software.

Previous votes shall be considered to remain applicable, but may be changed.

Yes

Yes, the English Wikipedia should enable <span> tags.

Previous votes

  1. Nohat 02:20, 2004 May 4 (UTC) LOTS of HTML tags are permitted. Why the discrimation against span?
  2. Eurleif 02:26, May 4, 2004 (UTC)
  3. Tεxτurε 14:27, 4 May 2004 (UTC) - Very few people are scared by HTML these days.[reply]
  4. Anárion 09:07, 5 May 2004 (UTC) Enable for now. Once the en Wiki moves to UTF-8 we won't need span anymore for the Bidi (LTR/RTL) issues, and language tagging should be done with Wiki markup. {{lang foo}} & {{/lang foo}} anyone? The inline styles should be kept out: any CSS styling should be done by mapping smart wiki markup to CSS styles in the global style sheet, since some user agents cannot reliably override inline styles.[reply]
  5. kelvSYC 05:15, 6 May 2004 (UTC) - We have stuff that's a lot worse, like <div style="display:inline"/>[reply]
  6. --Ævar Arnfjörð Bjarmason 11:26, 2004 May 8 (UTC)
  7. Zeimusu 14:03, 2004 May 10 (UTC)

New votes

  1. Eequor 20:06, 1 Aug 2004 (UTC)
  2. — Chameleon Main/Talk/Images 21:24, 1 Aug 2004 (UTC)
  3. Salasks 22:14, 1 Aug 2004 (UTC) Should be allowed, but used only when necessary

No

No, the English Wikipedia should not enable <span> tags.

Previous votes

  1. Eloquence* (less, not more HTML)
  2. Christopher Mahan (wikisyntax for this wiki)
  3. ✏ Sverdrup : HTML is un-wiki.
  4. Lunchboxhero: design customization is unwiki
  5. Finlay McWalter : reasons in "comments", below
  6. →Raul654 For the above reasons
  7. Phil | Talk : we should be moving towards replacing and disallowing the problematical HTML tags
  8. olderwiser 19:46, 4 May 2004 (UTC) Less HTML not more.[reply]
  9. The Anome span is bad: see "another suggestion" section below for suggested Wikimarkup <lang> tag that does exactly what proponents are asking for in terms of language markup, and only that.
  10. Rholton As Wikipedia becomes increasingly well-known, more and more people who are non-technical will contribute if we avoid lots of ugly HTML. Fewer Wikipeadian know HTML, not more.
  11. Bodnotbod I'm anti-HTML in the interests of embracing contributors based on their ability to write a good article, not on their ability to use a mark up language.
  12. Matthewmayer: a step in the right direction
  13. Timwi

New votes

  1. Angela: span tags would be overused—in the same way emdashes are now—and you'd end up with such tags added over all the place for no reason making the wikitext much too hard to read.

Comments

To those who vote "no", I ask the following two questions:

  • What do you recommend users do right now if they want to specify language, direction, or style for an inline run of text? Is your suggestion really better than the single change of allowing span tags?
  • By voting "no", you are supporting the status quo of allowing all those other HTML tags but not span tags. How can you support the unequal support of all those other tags and not allowing span? On what philosophical basis do you allow big, small, and font tags but not span tags?

Nohat 17:13, 2004 May 4 (UTC)

What is the purpose of this poll? It's up to the developers to take on a project, not for us to try to force them to do anything. RickK 02:27, 4 May 2004 (UTC)[reply]

I am inclined to agree with Rickk. →Raul654 02:29, May 4, 2004 (UTC)

It's not really a "project". It's a single-line code change that could easily be a configuration option. Nohat 02:33, 2004 May 4 (UTC) As background, I along with several other users have requested allowing span tags on the mailing lists and have been rebuffed. I thought it was time to have a public debate on the Wiki with the goal of determining whether or not people want them or not. Nohat 02:38, 2004 May 4 (UTC)

Is there anyone who would like to summarise the (presumably technical) objections to allowing <span> tags? --Stormie 02:59, May 4, 2004 (UTC)

I haven't followed this particular discussion, but my main objection would be that every single HTML tag makes wiki pages more difficult to edit. Our replacements aren't always much better (the table syntax in particular can be very frustrating) but they at least go into the right direction. Imagine you're a Ph.D. historian and you're trying to improve an article about the Black Death. "Hey, this is cool, I can edit this page" you think - but then you see a page that is littered with HTML tags, and you are immediately scared away. --Eloquence* 03:18, May 4, 2004 (UTC)
Consider <div style="display:inline"/>, which is currently the only real alternative to <span>. Is that not scarier? Also consider that the entire internet uses HTML, whereas only MediaWiki projects use MediaWiki syntax. It is more reasonable to expect familiarity with HTML than with MediaWiki. I've seen comments by users who were clearly quite comfortable with HTML and totally confused by the new syntax that the wiki imposes on them. In particular, image syntax is not necessarily intuitive, and table syntax can easily become unintelligible. --Eequor 20:19, 1 Aug 2004 (UTC)
My inclination would be to move towards allowing HTML only in the forthcoming Template: namespace (which will replace the MediaWiki: namespace) and to completely cleanse the article source from it. Replace <br> with "\\", improve the image syntax further, etc. While I'm ranting: Why does the source have to include things like [[User:Stormie|Stormie]]? Why not just [[User:Stormie]] and indicate the fact that it's a user page using an icon? Also, the pipe trick shouldn't be resolved on save but on load.
I don't know what the other developers think, but my focus is to make things easier, not more complicated, for people who know nothing about HTML.--Eloquence* 03:18, May 4, 2004 (UTC)
Well, that was eloquently put, Eloquence. :-) I think I will abstain from voting on this one, since on the one hand, I don't want to say "yes" because I largely agree with you, but I also don't want to say "no" without being convinced that the necessary work to remove the requirement for HTML is going strong.. --Stormie 05:27, May 4, 2004 (UTC)

Can't one override the standard Wikipedia CSS definitions if the span tag allows including one's own CSS definitions? Wouldn't that open the door to truly horrendous (malicious) hacks? At least, it seems to me that this would be the end of any uniform appearance of Wikipedia articles. I'm inclined to vote "no" because of this, but would like to see somebody more knowledgeable than me comment on this. It's been a while since I did anything with CSS... Lupo 14:44, 4 May 2004 (UTC)[reply]

If this were true (I don't know if it is or not), it would already be possible because inline CSS styles are allowed on all the permitted HTML tags, such as <div>. Nohat 14:51, 2004 May 4 (UTC)

We should be trying hard to get away from all HTML markup (to the point where I'd want no new article to be permitted to contain any)

  • one day (soon) we'll want to transcode wikimarkup to something other than HTML (actually, we transcode to XHTML in the forthcoming version, and articles with user-supplied HTML will already make pages fail to validate). We mustn't break transcoding for speech, for any number of small-device XML markups, and for whatever the new new markup is in a few years are all made harder when HTML is present. Wikimarkup needs to outlast HTML.
  • user HTML subverts the stylesheet. Everything in the final html code emitted should be styled, both for appearance and particularly for accessibility. Accessibility design in particular is hard and should be done once (in the html/css layer), not done badly or (more likely) not at all in the article's wikitext.
  • I see entirely why folks want to use span, and it's very similar to the same reason people used floating DIV tags for images - this exposes a deficiency in the current wikimarkup. The fix is to add support in wikimarkup, not allow it to be circumvented.
  • it's unportable - much effort is gone into the stylesheets to make wikimarkup transcode to something that works well on a wide variety of browsers. Authors frequently (>95% of the time) add HTML markup that they've only tested on one, current, browser (those floating image DIVs are notoriously non-portable, whereas the new floaty-image-wikimarkup is perfect everywhere).

These are, I think, good technical reasons for avoiding html beyond the "wikimarkup is easy, html is hard" mention above. -- Finlay McWalter | Talk 16:38, 4 May 2004 (UTC)[reply]

Great, I totally agree there should be A Better Way. But until there is, how does allowing span tags make things worse? We already allow tons and tons of other tags, why not span? Nohat 16:53, 2004 May 4 (UTC)
Just because they're allowed does not mean I use them. I personally use only wikicode in wikipedia. This is not because I can't use html, since I am a professional web developer and code css+xhtml1.1. I just know that (x)html is hard to get right even for people who know it really well. I personally would like zero html tags in wikipedia, and use only wikisyntax. If it can't be done in wikisyntax, maybe it shouldn't be done? Christopher Mahan 17:32, 4 May 2004 (UTC)[reply]
So correctly displaying runs of foreign text in context shouldn't be done? Nohat 17:36, 2004 May 4 (UTC)
You can't send a subway sandwich by FedEx. It's a limitation of the system.
If you want to change that, propose changes to wikisyntax to support such foreign text. The easy way is not always the best way. Christopher Mahan 18:22, 4 May 2004 (UTC)[reply]
I will, I will! But in the meantime, while we debate over the hundred possible permutations of the syntax and which one people want, people will continue to use HTML tags that were not meant for doing the things span tags should be used for, which is decidedly worse than using span tags appropriately. I'm only requesting that span tags be enabled in the interim until a better solution can be developed. We already allow nearly every other HTML tag. I have yet to see one legitimate explanation why all those other tags are allowed but span tags are not. People keep saying the same thing: "we should have less HTML; this should be done via wiki syntax" but no one, not a single person, has explained how allowing span tags would in any way make wikipedia worse. If anything it'll make it better, because it will allow a simple conversion from span tags to the new wiki syntax, whereas not allowing span tags will require figuring out every way people worked around the problem and converting that mess. Is that really what you want? People are already using <font lang="..."> and <font style="..."> tags. Shouldn't we at least make it possible to do it a better way, even if it's not the best way? Nohat 18:34, 2004 May 4 (UTC)

Well, of course. But the better way is to use wikisyntax. Anything short of that will have to be redone. By hand. Christopher Mahan 18:44, 4 May 2004 (UTC)[reply]

If people consistently use <span dir="rtl" lang="he"> or <span lang="fr"> then I don't see why after the introduction of a wikisyntax they couldn't be automatically converted by a search and replace through the database. "But the better way is to use wikisyntax." That doesn't mean that allowing span tags isn't better than using font tags.

I'd also like to add that I fully expect all those who vote no on this poll either to actively agitate the developers to disallow support of HTML tags or explain what in specific is wrong with span tags that is not wrong with the other HTML tags. To do otherwise would be hypocritical. Nohat 18:48, 2004 May 4 (UTC)

It's a horrible hack to use a font tag, and it's a horrible hack to use a span tag. Whether one is marginally less horrible is debatable. We shouldn't waste effort twiddling around with one broken solution vs another. I entirely agree that the text-direction thing is urgent (everything else certainly is not). We have to have a hack for it until the new syntax is ready, and we want a means of being able to find and destroy the hack (in whatever nasty form it is) once the syntax is available. Whether it's a span or a font, folks are going to use their own subtle variations, which makes that search-and-destroy phase more difficult. So can't we do something like:
  • implement a couple of msg tags, e.g. {{msg:bidi-leftright}} and {{msg:bidi-rightleft}} which implement the text/lang thing using font, i, or whatever unpleasant means is currently necessary
  • insist that the above msgs are the only way folks should be doing bidi stuff
  • when the new syntax is done, it's easy (for a SQL query or a bot) to find all the bidi msgs and automatically replace them.
Isn't this a less hacky hack, with a credible exit-strategy, than either continuing to use font tags in the article wikitext or merely using span tags instead? -- Finlay McWalter | Talk 18:56, 4 May 2004 (UTC)[reply]
I'm not sure why you characterize using span tags as a "horrible hack". It's the HTML-correct way to specify direction or language of an inline run of text. Your solution also doesn't address the problem of language tagging. Farsi, Urdu, and Arabic all use the same alphabet, but Arabic is ordinarily rendered with lots of automatic ligatures and Farsi and Urdu are not. The Unicode characters are the same but the correct rendering is different. The correct way to specify for a run of arabic text what language it is is to use <span lang="ar"&gt: or <span lang="fa">, etc. Similarly, Serbian uses several different glyphs for certain Cyrillic characters when they are italicized, although the Unicode character codes are the same. The only way to tell the browser that a run of text should be rendered as Serbian is by a <span lang="sr"> tag. What is your proposal to solve this problem? Nohat 19:07, 2004 May 4 (UTC)
This isn't an html wiki. It's a wikimarkup wiki. So every use of html is a horrible hack, waiting the day someone writes some wikimarkup handling code to obviate the need for it. To address your specific concern, a lang= attribute can be attached to any tag, so you don't need span, and can use msgs comparable to the above ones. "To do otherwise would be hypocritical". Sigh, now this is turning from a civil technical discussion into mere bickering, and sorry, but that's not I game I'm willing to play. I've said my piece on this subject. -- Finlay McWalter | Talk 19:31, 4 May 2004 (UTC)[reply]
It seems to me that {{msg:bidi-rightleft}} rtl txt {{msg:bidi-rightleft-end}} is in fact a worse solution than <span dir="rtl"> rtl text </span>. Not only is it longer, but it's made-up, in that it doesn't conform to any already existing standard for marking up such text. And how is it any more difficult to search-and-replace for <span dir="rtl"> than it is for {{msg:bidi-rightleft}} ? Finally, do you propose creating separate {{msg:lang}}s for every language? How is that better than just allowing <span lange="..."> and replacing those tags with the wiki syntax when (if ever) it is implemented. In fact, in a recent vote, HTML-like syntax was voted for in favor of syntaxes which were more wiki-like, but less HTML-like. This shows me that for rarely-used options, like, say, labeling spans of foreign language text, or hieroglypics, or math, Wikipedians prefer an HTML-like syntax, which span tags are and {{msg:bidi-rightleft}} are not. Nohat 19:52, 2004 May 4 (UTC)

Don't really have the time not the inclination to do any active agitation of developers. They volunteer their time and talent, and I for one am glad they are doing as much as they are already doing. ... As far as the search and replace: good luck. Christopher Mahan 18:58, 4 May 2004 (UTC)[reply]

How can you stand against my simple request for allowing span tags but not stand against all the other HTML tags? Nohat 19:07, 2004 May 4 (UTC)
I didn't say I don't stand against other html tags. I just don't want to bother the developers about it. Yours is not a simple request, it's a step in the wrong direction. It's like a drunk at the bar saying: Ahm allreadee dr-unk, so it don't matter if I... burp....have a... one more drink... Christopher Mahan 20:59, 4 May 2004 (UTC)[reply]

Another suggestion

I agree with nohat that "...for rarely-used options, like, say, labeling spans of foreign language text, or hieroglypics, or math, Wikipedians prefer an HTML-like syntax".

Just as we have HTML-like tags for <math></math> and so on, we should consider having a Wikipedia-specific HTML-like tag for language, <lang="en"> and so on. This would not be HTML: this would be Wiki-markup (just as much so as <math>), which is then rendered to produce appropriate HTML, XHTML, TeX, SGML, etc. etc.

Because it's a pseudo-tag, we could also remove any requirement for nesting, and so allow things like <lang="ar"> <lang="en">...

There's also no need for a LTR/RTL tag: BiDi can be automatically inferred from language, and language tags convey more information than merely direction tags.

Oh, and let's move the en: Wikipedia to UTF-8 ASAP. The longer we wait, the more the pain. -- The Anome 09:20, 5 May 2004 (UTC)[reply]

What should the language be after <lang="ar"> ... <lang="en"> ... </lang>? --Eequor 20:28, 1 Aug 2004 (UTC)

Contrivance

It seems overly contrived to provide an example with three <span> tags in one paragraph, especially as the latter two are unlikely to have any effect. -_-;; --Eequor 22:02, 1 Aug 2004 (UTC)

<div> poll

This poll is to answer the following question:

Should the English Wikipedia continue to allow <div> tags?

Yes

Yes, the English Wikipedia should continue to allow <div> tags.

  1. Eequor 21:04, 1 Aug 2004 (UTC)
  2. — Chameleon Main/Talk/Images 21:24, 1 Aug 2004 (UTC)

No

No, <div> tags should be disabled on the English Wikipedia.

Comments

Thought experiment

This poll considers a hypothetical Wikipedia in which the following HTML tags have always been supported:

  • <b>
  • <big>
  • <blockquote>
  • <br>
  • <caption>
  • <cite>
  • <code>
  • <dd>
  • <div>
  • <dl>
  • <dt>
  • <em>
  • <font>
  • <h1>
  • <h2>
  • <h3>
  • <h4>
  • <h5>
  • <h6>
  • <hr>
  • <i>
  • <li>
  • <ol>
  • <p>
  • <pre>
  • <rb>
  • <rp>
  • <rt>
  • <ruby>
  • <s>
  • <small>
  • <span>
  • <strike>
  • <strong>
  • <sub>
  • <sup>
  • <table>
  • <td>
  • <th>
  • <tr>
  • <tt>
  • <u>
  • <ul>
  • <var>
  • <!-- ... -->

Should the English Wikipedia continue to allow <span> tags?

Yes

Yes, the English Wikipedia should continue to allow <span> tags.

  1. Eequor 21:04, 1 Aug 2004 (UTC)
  2. — Chameleon Main/Talk/Images 21:24, 1 Aug 2004 (UTC)

No

No, <span> tags should be disabled on the English Wikipedia.

Comments