Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Wikipedia:Span tags

From Wikipedia, the free encyclopedia
For a list of classes that can be used with the span tag, seeWP:Catalogue of CSS classes.
For span tag attributes, seeHTML attribute.
Shortcut

On Wikipedia, HTML<span>...</span> elements are used to group logically related text. They allow:

  • 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; this is generally done through the{{Lang}} templates, not with manual span markup)
  • Explicitly setting the direction of the text (LTR or RTL).
  • Avoidance of other HTML tags, such as<s> and the now-deprecated<strike>, which would otherwise be used as workarounds, but are less suitable.
  • Syntax highlighting; code excerpts can be colorized for easier reading, customizable with CSS.
  • Various uses in infoboxes and navigational templates.
  • Specification ofclass andid attributes for certainboilerplate messages which should be inlined; e.g., {{merge}}.
  • Citation templates (see above).
  • Setting anchors in the text to which incoming links may jump; this is usually done with the{{Anchor}} template.

Almost allHTML tags that are allowed in Wikipedia permit inlineCSS styles.

History

[edit]

Span tags were enabled inMediaWiki on December 23, 2004. Polls were held in May and August 2004 on whether the English Wikipedia should enable them. Theresults were equally split between supporting and opposing the addition of these tags. In December, the earlier objections that this would be a semantically void element were deemed to be no longer applicable since MediaWiki now has a way to add to the global stylesheets in the wiki (at least for the main skins). The addition of<span> to thewhitelist wasannounced, following no general objection amongstdevelopers.

General
technical help
Special
page
-related
Wikitext
Links anddiffs
Media files: images,
videos and sounds
Other graphics
Templates and
Lua modules
Data structure
HTML andCSS
Customisation
and tools
Automated editing
Retrieved from "https://en.wikipedia.org/w/index.php?title=Wikipedia:Span_tags&oldid=1178391041"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp