Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Help:Link color

Page semi-protected
From Wikipedia, the free encyclopedia

This page is for technical help on coloring links in articles, for technical help on color use in articles in general, seeHelp:Using colors. For the MOS guideline on color use in articles, seeMOS:COLOR. For color tables and a color pallette, seeMOS:COLORS. For the WikiProject, seeWikipedia:WikiProject Color. For the civility essay dealing with colors, seeWikipedia:Don't edit war over the color of templates.
This help page is ahow-to guide.
It explains concepts or processes used by the Wikipedia community. It is not one ofWikipedia's policies or guidelines, and may reflect varying levels ofconsensus.
Linking and
page manipulation

In Wikipedia, the color of alink shows the status of the corresponding target page. The default colors (in the defaultskinVector 2022) have the meanings shown in the table below. See alsoWikipedia:Manual of Style/Accessibility/Colors.

Standard colors

Standard link colors, in Vector 2022 and other skins
Link colorTypeVector 2022Other skins
Color codeColorColor codeColor
blue link (Vector 2022)
blue link (other skins)
Link to a Wikipedia page that currently exists, but you never visited#3366CC = rgb(51,102,204) #0645AD = rgb(6,69,173) 
purple link (Vector 2022)
indigo link (other skins)
Link to a Wikipedia page that exists and that you have visited#795CB2 = rgb(121,92,178) #0B0080 = rgb(11,0,128) 
red link (Vector 2022)
red link (other skins)
Link to a Wikipedia page thatdoes not currently exist, and you never visited#BF3C2D = rgb(191,60,45) #BA0000 = rgb(186,0,0) 
light maroon linkLink to a Wikipedia page that does not currently exist, but that you have visited#A55858 = rgb(165,88,88) #A55858 = rgb(165,88,88) 
maroon linkLink to avery short article/stub within Wikipedia, but only if the user has set a preference option to format links to stubs in this waynot yet defined#772233 = rgb(119,34,51) 
blue link (Vector 2022)
light blue link 1 (other skins)
light blue link 2 (other skins)
Link to a pageat another wiki, usuallyanother Wikimedia project or anexternal link.
Note that the light blue color is used whether or not the page actually exists at the target wiki. For example, there is an article aboutGeorge Washington Carver here on the English Wikipedia, while there isno article of the same name on the Japanese Wikipedia; but they do havean article about the same man under a different title.
#3366CC = rgb(51,102,204) #3366BB = rgb(51,102,187) 
purple link (Vector 2022)
purple link (other skins)
Link to a page on another site that has been visited#795CB2 = rgb(121,92,178) #663366 = rgb(102,51,102) 

Note that the colors in the boxes may appear darker than text of the same color; also, larger or bold text will tend to look darker. Furthermore, the actual color seen by a user will vary slightly according to their operating system, desktop settings, and browser, as well as their monitor and for low-endLCDs, viewing angle. Logged-in users can also change the colors they see by selecting a different skin or usingcustom CSS.

Custom colors

Further information:Help:Using colours

To use named CSS colors for text on a white background, refer toWikipedia:Manual of Style/Accessibility/CSS colors for text on white for recommended colors.

Normal text

Further information:Template:Color

For normal text, the{{color}} template with two parameters can be used: the color, either by name or hex code, and some text.However, prose text intended for readers should never be manually colored. (MOS:PROSECOLOR)

  • {{color|orange|Hello, world!}}Hello, world!
  • {{color|#00F000|Hello, world!}}Hello, world!

Links

Refrain from implementing colored links that may impede user ability to distinguish links from regular text, or color links for purely aesthetic reasons. (MOS:COLOR)

Styling individual links on a page

Further information:Template:Colored link

You can set the color of an individual link or set of links on a page (rather than a global change to the style of all links on Wikipedia) as follows. Setting styles in this way will apply to everyone who views those particular links or that particular page, not just you.However, links intended for readers should never be manually colored. (MOS:LINKCOLOR)

The{{colored link}} template takes two parameters to function: the color of the link, the article being linked to, with an optional third parameter for alternative text to display as apiped link.

  • {{colored link|orange|Canada}}Canada
  • {{colored link|#00F000|Page name to link|Alternative text}}Alternative text
Or

You can turn links a different color like so:

Markup
*[[example|<span>This page exists.</span>]]*[[exampl|<span>This page does not exist.</span>]]
Renders as

Or, if you desireexistence checking, you can try:

Markup
*[[example|{{#ifexist: example|<span>This page exists.</span>|This page does not exist.}}]]*[[exampl|{{#ifexist: exampl|<span>This page exists.</span>|This page does not exist.}}]]
Renders as

External links

A similar styled span can be added within an external link:

Markup
*[http://example.com <span>Example external link</span>]
Renders as

Styling all links just for you

You can also customize link colors by editing theCSS at yourskin subpage. This is a change which will apply toall links throughout the site, but will only be visible to you.

The standard link selectors are:

  • a:link — defines the style for normal unvisited links
  • a:visited — defines the style for visited links
  • a:active — defines the style for active links; links become active once you click on them
  • a:hover — defines the style for hovered links; links hover when the mouse moves over it

Colors are defined by hexadecimal characters: seeweb colors.

/* standard link colors */.mw-body-contenta:link{color:#0000FF;}/* normal unvisited links */.mw-body-contenta:link:visited{color:#0B0080;}/* visited links */.mw-body-contenta:link:active{color:#FF0000;}/* active links */.mw-body-contenta:link.new{color:#FF0000;}/* new links */.mw-body-contenta:link.extiw{color:#3366BB;}/* interwiki links */.mw-body-contenta:link.external{color:#3366BB;}/* external links */.mw-body-contenta:link.stub{color:#772233;}/* hovered links */.mw-body-contenta:link{color:#FF0000}.mw-body-contenta:visited{color:#00FF00}.mw-body-contenta:hover{color:#FF00FF}.mw-body-contenta:active{color:#0000FF}

Notes:

  • a:hover must come after a:link and a:visited
  • a:active must come after a:hover
  • you need to have ".mw-body-content" in front of the standard link definition, because otherwise the default definition on this website will still take precedence over what you have defined.

Redirect

Show redirects as green links:

.mw-body-contenta.mw-redirect{color:#308050}.mw-body-contenta.mw-redirect:visited{color:#3070A0}

External

Show external links as green links:

.mw-body-contenta.external{color:#008000}.mw-body-contenta.external:visited{color:#008000}

Text decoration

This allows formatting such as underlines. For example:

.mw-body-contenta:link{color:#000000;text-decoration:underline;}

Possible values are:

  • none
  • underline
  • overline
  • line-through

Font family

This will change the link font:

.mw-body-contenta:link{font-family:monospace}

Preferences

The "display links todisambiguation pages in orange" feature, located in thegadgets tab of the preferences menu (under the "appearance" section), shows you all links to disambiguation pages inorange.

Scripts

User:Anomie/linkclassifier is a popular script that customizes colors to indicate links such as pages to be deleted, nonfree-media, redirects, protected pages and more.

See also

Help desk
About Wikipedia (?)
Help for readers (?)
Contributing
to Wikipedia
 (?)
Getting started (?)
Dos and don'ts (?)
How-to pages and
information pages (?)
Coding (?)
Directories (?)
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=Help:Link_color&oldid=1305866933"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp