Help:Wikitext: Difference between revisions

Content deleted Content added
Line 740:
 
==Links and URLs==
{{Note|This whole section on links is better read on wikipedia, as the original links are there, here we had to prepend <code>Wikipedia:</code> to avoid many broken links. Original here: [[Wikipedia:Help:Wikitext#Links and URLs|Links and URLs]]}}
{{main|Wikipedia:Help:Link}}
 
Line 774 ⟶ 775:
|-
|
<code><nowiki>New York also has [[Wikipedia:public transport|public transportation]].</nowiki></code>
|
New York also has [[Wikipedia:public transport|public transportation]].
Line 781 ⟶ 782:
====Automatically rename links====
 
* Simply typing the pipe character | after a link will automatically rename the link in certain circumstances. The next time you open the edit box you will see the expanded piped link. When [[Wikipedia:Help:Show preview|previewing]] your edits, you will not see the expanded form until you press '''Save''' and '''Edit''' again. The same applies to [[#link-to-section|links to sections within the same page]].
* See [[Wikipedia:Help:Pipe trick|Pipe trick]] for details.
 
Line 902 ⟶ 903:
 
* [[Wikipedia:Redirect|Redirect]] one article title to another by placing a directive like the one shown to the right on the ''first'' line of the article (such as at a page titled "[[Wikipedia:US|US]]").
* It is possible to redirect to a section. For example, a redirect to [[Wikipedia:United States#History]] will redirect to the History section of the [[Wikipedia:United States|United States]] page, if it exists.
 
{| class="wikitable" border=1
Line 930 ⟶ 931:
<code><nowiki>See the [[Help:Protecting and unprotecting pages]].</nowiki></code>
|
See the [[Wikipedia:Help:Protecting and unprotecting pages|Help:Protecting and unprotecting pages]].
|}
 
===Link to the same article in another language (interlanguage links)===
{{main|Wikipedia:Help:Interlanguage links|Wikipedia:Complete list of language wikis available}}
{{notice|After the launch of [[Wikipedia:Wikidata|Wikidata]], interlanguage links are now added through it. Links in articles should exist only in special cases, for example when an article in one language has two articles in another language.}}
 
Line 941 ⟶ 942:
* Interlanguage links are not visible within the formatted article, but instead appear as language links on the sidebar (to the left) under the menu section "languages".
 
* '''NOTE:''' To create an '''''inline link''''' (a clickable link within the text) to ''any'' foreign language article, see [[Wikipedia:Help:Interlanguage links#Inline interlanguage links]] and consider the usage notes.
 
{| class="wikitable"
Line 948 ⟶ 949:
|-
|
''Link from English article "Plankton" to the Spanish article [[Wikipedia:es:Plancton|"Plancton"]].''
 
''"es" is the language code for "{{lang|es|español}}" (the [[Wikipedia:Spanish language|Spanish language]]).''
|
<pre>
Line 971 ⟶ 972:
===Interwiki link===
 
* [[Wikipedia:Interwiki links|Interwiki links]] link to any page on other wikis. [[Wikipedia:Help:Interwikimedia links|Interwikimedia links]] link to other Wikimedia wikis.
* Note that interwikimedia links use the internal link style, with double square brackets.
* See [[MetaWikiPediaMetaWikimedia:Interwiki_map]] for the list of shortcuts; if the site you want to link to is not on the list, use an [[#External links|external link]].
* See also [[Wikipedia:Wikimedia sister projects|Wikimedia sister projects]].
 
Line 1,065 ⟶ 1,066:
 
*Single square brackets indicate an external link. Note the use of a ''space'' (not a pipe |) to separate the URL from the link text in a named link. Square brackets may be used as normal punctuation when not linking to anything – [like this].
*A [[Wikipedia:Uniform Resource Locator|URL]] must begin with a supported [[Wikipedia:URI scheme|URI scheme]]: <code>http://</code> and <code>https://</code> will be supported by all browsers; <code>irc://</code>, <code>ircs://</code>, <code>ftp://</code>, <syntaxhighlight lang="text" inline>news://</syntaxhighlight>, <code>mailto:</code>, and <code>gopher://</code> will require a plugin or an external application. IPv6 addresses in URLs are currently not supported.
*A URL containing certain characters will display and link incorrectly unless those characters are [[Wikipedia:Percent-encoding|percent encoded]]. For example, a space must be replaced by <code>%20</code>. Encoding can be achieved by:
:*Use the link button [[File:OOjs UI icon link-ltr.svg]] on the enhanced editing toolbar to encode the link; this tool will add the bracket markup and the linked text, which may not always be desirable.
:*Or manually encode the URL by replacing these characters:
Line 1,075 ⟶ 1,076:
| %20 || %22 || %27 || %2c || %3b || %3c || %3e || %3f || %5b || %5d
|}
:*Or use the <code><nowiki>{{urlencode:}}</nowiki></code> magic word. See [[:mw:Help:Magic words#URL data|Help:Magic words]] in the MediaWiki documentation for more details.
 
* See [[Wikipedia:External links]] for style issues, and [[:Category:External link file type templates]] for indicating the file type of an external link with an icon.
Line 1,085 ⟶ 1,086:
|-
|
''Named link'' with an [[Wikipedia:Help:external link icons|external link icon]]
|
<code><nowiki>[http://www.wikipedia.org Wikipedia]</nowiki></code>
Line 1,122 ⟶ 1,123:
 
===Automatic links===
{{main|Wikipedia:Help:Magic links}}
 
Magic links are automatic links for certain unique identifiers that require no markup. They can be used for ISBN numbers, RFC numbers, and PMID numbers.
Line 1,225 ⟶ 1,226:
====Links partially italicized====
 
*Linking to a page with a title containing words that are usually italicized, such as the [[Wikipedia:Hindenburg disaster|''Hindenburg'' disaster]] article.
 
{| class="wikitable"
Line 1,234 ⟶ 1,235:
<code><nowiki>[[Hindenburg disaster|''Hindenburg'' disaster]]</nowiki></code>
|
[[Wikipedia:Hindenburg disaster|''Hindenburg'' disaster]]
|}