Template:Cite web/doc: Difference between revisions

no edit summary
(Capitalize first letter of template example and add "1" to first author in all and first editor)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<noinclude>{{pp-template}}</noinclude>
{{Documentation subpage}}
{{High-use}}
{{cascade-protected template}}
{{AWB standard installation}}
{{csdoc|lua}}
{{csdoc|cs1}}
{{csdoc|lead|web sources that are not characterized by another [[Help:Citation Style 1|CS1]] template. Do not use this template in the "[[WP:ELCITE|External links]]" section of articles}}
==Usage==
{{csdoc|usage}}
{{csdoc|usage common}}
For references with author credit
:<syntaxhighlight lang="wikitext" inline>{{Cite web |url= |title= |last= |first= |date= |website= |publisher= |access-date= |quote=}}</syntaxhighlight>
For references without author credit
:<syntaxhighlight lang="wikitext" inline>{{Cite web |url= |title= |author=<!--Not stated--> |date= |website= |publisher= |access-date= |quote=}}</syntaxhighlight>
{{end}}
{{csdoc|usage vertical common}}
<!-- Please synchronize this list with the corresponding one at the overview page [[Wikipedia:Citation templates#Examples]] -->
{{tj|Cite web
  | url:
  | title:
  | last:
  | first:
  | date:
  | website:
  | publisher:
  | access-date:
  | quote:
}}
{{end}}
{{csdoc|usage full}}
:<syntaxhighlight lang="wikitext" inline>{{Cite web |url= |url-access= |title= |last1= |first1= |author1= |author-link1= |last2= |first2= |author2= |author-link2= |date= |year= |orig-date= |editor-last1= |editor-first1= |editor1= |editor-link1= |editor-last2= |editor-first2= |editor-link2= |editors= |department= |website= |series= |publisher= |agency= |location= |page= |pages= |at= |language= |script-title= |trans-title= |type= |format= |arxiv= |asin= |bibcode= |doi= |doi-broken-date= |isbn= |issn= |jfm= |jstor= |lccn= |mr= |oclc= |ol= |osti= |pmc= |pmid= |rfc= |ssrn= |zbl= |id= |access-date= |url-status= |archive-url= |archive-date= |via= |quote= |trans-quote= |ref= |postscript=}}</syntaxhighlight>
{{end}}
{{csdoc|usage vertical}}
<pre style="margin:0px; border:none; white-space:pre;">
{{Cite web
| url          =
| url-access  =
| title        =
| last1        =
| first1      =
| author-link1 =
| last2        =
| first2      =
| author-link2 =
| date        =
| year        =
| orig-date    =
| editor-last1 =
| editor-first1=
| editor-link1 =
| editor2-last =
| editor2-first=
| editor2-link =
| department  =
| website      =
| series      =
| publisher    =
| agency      =
| location    =
| page        =
| pages        =
| at          =
| language    =
| script-title =
| trans-title  =
| type        =
| format      =
| arxiv        =
| asin        =
| bibcode      =
| doi          =
| doi-broken-date=
| isbn        =
| issn        =
| jfm          =
| jstor        =
| lccn        =
| mr          =
| oclc        =
| ol          =
| osti        =
| pmc          =
| pmid        =
| rfc          =
| ssrn        =
| zbl          =
| id          =
| access-date  =
| url-status  =
| archive-url  =
| archive-date =
| via          =
| quote        =
| ref          =
| postscript  = }}
</pre>
{{csdoc|usage vertical mid}}
<pre style="margin:0px; border:none; white-space:pre;">
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
last
&nbsp;
last
last2
&nbsp;
&nbsp;
&nbsp;
date or year
&nbsp;
editor-last
&nbsp;
editor-last
editor2-last
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
url
url, archive-url
url, archive-date
archive-url
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
</pre>
{{csdoc|usage vertical mid}}
<pre style="margin:0px; border:none; white-space:pre;">
&nbsp;
required
&nbsp;
required
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
</pre>
{{csdoc|usage vertical end}}
===Choosing between [[Template:cite web]] and [[Template:cite news]]<span class="anchor" id="Consistency"></span>===
Before 2014, editors had to decide whether to use {{tl|cite web}} or {{tl|cite news}} based on their features. In 2014, {{em|most of}} the differences between the two templates were eliminated.
As of {{diff|Module:Citation/CS1|732205428|723907342|29 July 2016}}, {{tlf|cite web}} and {{tlf|cite news}} have the following differences:
* {{tlf|cite news}} can be used for [[WP:OFFLINE|offline]] (paper) sources whereas {{tlf|cite web}} generates a missing URL error when no URL is provided
* {{tlf|cite news}} accepts {{para|issue}} and {{para|volume}} parameters while {{tlf|cite web}} does not (See {{slink|Help:Citation Style 1#Pages}}; see also {{tl|cite magazine}}).
But given the same set of valid parameters, their output is exactly the same:
<!-- ATTENTION!
The following example only serves to demonstrate parameter rending results.
Whether you must include all these parameters in actual articles is not a concern here.
-->
{|
| '''cite web''': || {{cite web |url=https://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle |publisher=Hearst Corporation |access-date=May 26, 2015}}
|-
| '''cite news''': || {{cite news |url=https://blog.chron.com/techblog/2011/07/microsoft-envisions-a-universal-os-but-it-might-not-be-called-windows/ |title=Microsoft envisions a universal OS, but it might not be called Windows |last=Silverman |first=Dwight |date=July 15, 2011 |work=Houston Chronicle |publisher=Hearst Corporation |access-date=May 26, 2015}}
|}
==Examples==
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date=</nowiki>{{date|{{date}}|mdy}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date={{date|{{date}}|mdy}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=30 April 2005
|website=Encyclopedia of Things
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=30 April 2005
|website=Encyclopedia of Things
|access-date={{date}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=2005-04-30
|access-date=</nowiki>{{date|{{date}}|iso}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|date=2005-04-30
|access-date={{date|{{date}}|iso}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|access-date={{date}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|access-date=</nowiki>{{date|{{date}}|iso}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|access-date={{date|{{date}}|iso}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://operations.nfl.com/the-rules/nfl-rules-digest/
|title=NFL Rules Digest
|website=NFL Football Operations
|publisher=[[National Football League]]
|access-date=</nowiki>{{date|{{date}}|mdy}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://operations.nfl.com/the-rules/nfl-rules-digest/
|title=NFL Rules Digest
|website=NFL Football Operations
|publisher=[[National Football League]]
|access-date={{date|{{date}}|mdy}}}}
}}
===Using "format="===
When this template detects a link whose URL includes an [[filename extension|extension]] of ".pdf" or ".PDF", typical of [[PDF]] files, it automatically displays a PDF icon after the link (regardless of whether the link goes to a PDF file or to an HTML landing page, typical of paysites). It also internally acts as if {{para|format|PDF}} had been specified, which displays " (PDF)" after the icon. (In this case, an explicit {{para|format|PDF}} parameter would be redundant, so it ''is not'' recommended to add it. Users may remove it. Citation bot, when invoked, will remove it. ([[User talk:Citation bot/Archive 13#Remove format=pdf and variants when URLs end in .pdf|ref]]))
<div style="width:auto; overflow:scroll">
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.indiapost.gov.in/MBE/DOP_PDFFiles/List_of_Psychotropic_Substances.pdf
|title=List of psychotropic substances under international control
|publisher=International Narcotics Control Board
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.indiapost.gov.in/MBE/DOP_PDFFiles/List_of_Psychotropic_Substances.pdf
|title=List of psychotropic substances under international control
|publisher=International Narcotics Control Board
|access-date={{date}}}}
}}
</div>
If the link is to a PDF file that ''is not'' automatically recognizable by its extension, this template does not display the PDF icon. You may add the parameter {{para|format|PDF}}, which displays " (PDF)" after the link (but no PDF icon).
<div style="width:auto; overflow:scroll">
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.sample.com/somePDFdocument.000
|title=Some PDF Document
|publisher=Sample Int'l
|format=PDF
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.sample.com/somePDFdocument.000
|title=Some PDF Document
|publisher=Sample Int'l
|format=PDF
|access-date={{date}}}}
}}
</div>
For links to files in other formats, no icon is displayed. For example, for an [[.odt]] file, you may add the parameter {{para|format|ODT}}, which displays " (ODT)" after the link.
<div style="width:auto; overflow:scroll">
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.sample.com/someODTdocument.odt
|title=Some ODT Document
|publisher=Sample Int'l
|format=ODT
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.sample.com/someODTdocument.odt
|title=Some ODT Document
|publisher=Sample Int'l
|format=ODT
|access-date={{date}}}}
}}
</div>
===Foreign language and translated title===
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=Honi soit qui mal y pense
|last=Joliet
|first=François
|date=30 April 2005
|access-date=</nowiki>{{date}}<nowiki>
|language=fr
|trans-title=Shame on those who think evil of it}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=Honi soit qui mal y pense
|last=Joliet
|first=François
|date=30 April 2005
|access-date={{date}}
|language=fr
|trans-title=Shame on those who think evil of it}}
}}
===Using author-link===
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|author-link=John Doe
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date=</nowiki>{{date|{{date}}|mdy}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=My Favorite Things, Part II
|last=Doe
|first=John
|author-link=John Doe
|publisher=Open Publishing
|date=April 30, 2005
|website=Encyclopedia of Things
|access-date={{date|{{date}}|mdy}}}}
}}
===Multiple authors===
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=Our Favourite Things
|last1=Doe
|first1=John
|last2=Smith
|first2=Peter
|last3=Smythe
|first3=Jim
|publisher=Open Publishing
|date=30 April 2005
|website=Encyclopaedia of Things
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=Our Favourite Things
|last1=Doe
|first1=John
|last2=Smith
|first2=Peter
|last3=Smythe
|first3=Jim
|publisher=Open Publishing
|date=30 April 2005
|website=Encyclopaedia of Things
|access-date={{date}}}}
}}
===No author===
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=Index of Sharp Things
|publisher=Open Publishing
|date=2005-04-30
|website=Encyclopedia of Things
|access-date=</nowiki>{{date|{{date}}|iso}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=Index of Sharp Things
|publisher=Open Publishing
|date=2005-04-30
|website=Encyclopedia of Things
|access-date={{date|{{date}}|iso}}}}
}}
===No author, no publisher===
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=Index of Sharp Things
|date=30 April 2005
|website=Encyclopedia of Things
|access-date=</nowiki>{{date}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=Index of Sharp Things
|date=30 April 2005
|website=Encyclopedia of Things
|access-date={{date}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.example.org/
|title=Index of Sharp Things
|date=April 30, 2005
|access-date=</nowiki>{{date|{{date}}|mdy}}<nowiki>}}</nowiki>
|r={{cite web
|url=https://www.example.org/
|title=Index of Sharp Things
|date=April 30, 2005
|access-date={{date|{{date}}|mdy}}}}
}}
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.incb.org/documents/Psychotropics/forms/greenlist/2024/2311984R.pdf
|title=List of psychotropic substances under international control
|date=December 2023
|access-date=</nowiki>{{date|{{date}}|iso}}<nowiki>
|language=ru}}</nowiki>
|r={{cite web
|url=https://www.incb.org/documents/Psychotropics/forms/greenlist/2024/2311984R.pdf
|title=List of psychotropic substances under international control
|date=December 2023
|access-date={{date|{{date}}|iso}}
|language=ru}}
}}
===Using "archive-url" and "archive-date" (and optionally "url-status") for webpages that have been archived<span class="anchor" id="archive-url"></span>===
<div style="width:auto; overflow:scroll">By default, if "archive-url" is used, the parameter {{para|url-status|dead}} is assumed and the resulting main link is to the archived version:
{{markup2|
|m=<nowiki>{{cite web
|url=http://www.incb.org/pdf/e/list/green.pdf
|title=List of psychotropic substances under international control
|date=2005-04-30
|publisher=International Narcotics Control Board
|access-date=</nowiki>{{date|{{date}}|iso}}<nowiki>
|archive-url=https://web.archive.org/web/20050907150136/http://www.incb.org/pdf/e/list/green.pdf
|archive-date=2005-09-07}}</nowiki>
|r={{cite web
|url=http://www.incb.org/pdf/e/list/green.pdf
|title=List of psychotropic substances under international control
|date=2005-04-30
|publisher=International Narcotics Control Board
|access-date={{date|{{date}}|iso}}
|archive-url=https://web.archive.org/web/20050907150136/http://www.incb.org/pdf/e/list/green.pdf
|archive-date=2005-09-07}}
}}
</div>
<div style="width:auto; overflow:scroll">When {{para|url-status|live}} is specified, the resulting main link is to the original page:
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.hollywoodreporter.com/heat-vision/dc-entertainment-give-classic-batman-824572
|title=DC Entertainment To Give Classic Batman Writer Credit in 'Gotham' and 'Batman v Superman' (Exclusive)
|website=The Hollywood Reporter
|date=September 18, 2015
|access-date=September 21, 2015
|url-status=live
|archive-url=https://web.archive.org/web/20151022181821/http://www.hollywoodreporter.com/heat-vision/dc-entertainment-give-classic-batman-824572
|archive-date=October 22, 2015}}</nowiki>
|r={{cite web
|url=https://www.hollywoodreporter.com/heat-vision/dc-entertainment-give-classic-batman-824572
|title=DC Entertainment To Give Classic Batman Writer Credit in 'Gotham' and 'Batman v Superman' (Exclusive)
|website=The Hollywood Reporter
|date=September 18, 2015
|access-date=September 21, 2015
|url-status=live
|archive-url=https://web.archive.org/web/20151022181821/http://www.hollywoodreporter.com/heat-vision/dc-entertainment-give-classic-batman-824572
|archive-date=October 22, 2015}}
}}
</div>
<div style="width:auto; overflow:scroll">With {{para|url-status|unfit}} or {{code|usurped}}, the original is not linked at all:
{{markup2|
|m=<nowiki>{{cite web
|url=http://www.wunderground.com/global/stations/03772.html
|title=London, United Kingdom Forecast: Weather Underground (weather and elevation at Heathrow Airport)
|publisher=The Weather Underground
|access-date=</nowiki>{{date}}<nowiki>
|url-status=unfit |archive-url=https://web.archive.org/web/20110522171657/http://www.wunderground.com/global/stations/03772.html |archive-date=22 May 2011}}</nowiki>
|r={{cite web
|url=http://www.wunderground.com/global/stations/03772.html
|title=London, United Kingdom Forecast: Weather Underground (weather and elevation at Heathrow Airport)
|publisher=The Weather Underground
|access-date={{date}}
|url-status=unfit |archive-url=https://web.archive.org/web/20110522171657/http://www.wunderground.com/global/stations/03772.html |archive-date=22 May 2011}}
}}
</div>
===Using quote===
<div style="width:auto; overflow:scroll">
{{markup2|
|m=<nowiki>{{cite web
|url=https://www.webexhibits.org/daylightsaving/c.html
|title=Daylight saving time: rationale and original idea
|website=WebExhibits
|date=2008
|access-date=</nowiki>{{date}}<nowiki>
|quote=...&amp;nbsp;Lord Balfour came forward with a unique concern: 'Supposing some unfortunate lady was confined with twins&amp;nbsp;...'}}</nowiki>
|r={{cite web
|url=https://www.webexhibits.org/daylightsaving/c.html
|title=Daylight saving time: rationale and original idea
|website=WebExhibits
|date=2008
|access-date={{date}}
|quote=...&nbsp;Lord Balfour came forward with a unique concern: 'Supposing some unfortunate lady was confined with twins&nbsp;...'}}
}}
</div>
==Parameters==
===Syntax===
{{csdoc|syntax}}
{{csdoc|sep_period}}
===COinS===
{{csdoc|coins}}
===What's new===
{{csdoc|whats new}}
===Deprecated===
{{csdoc|deprecated}}
===Description===
====Authors====
{{csdoc|author|others=yes}}
====Title====
{{csdoc|web}}
{{csdoc|type}}
{{csdoc|language}}
====Date====
{{csdoc|date}}
====Website====
{{csdoc|journal|issue=no}}
====Publisher====
{{csdoc|publisher|work=no|web=yes}}
{{csdoc|agency}}
====Series====
{{csdoc|series}}
====In-source locations====
{{csdoc|pages}}
====URL<span class="anchor" id="url"></span>====
{{csdoc|url}}
====Access-date<span class="anchor" id="access-date"></span>====
See {{slink||url}}.
<!-- does not exist: {{csdoc|Access-date}} -->
====Anchor====
{{distinguish|#Identifiers}}
{{csdoc|ref}}
====Identifiers====
{{distinguish|#Anchor}}
{{csdoc|id1}}
{{csdoc|id2}}
====Quote====
{{csdoc|quote}}
====Editors====
{{csdoc|editor}}
====Display options====
{{csdoc|display}}
====Subscription or registration required====
{{csdoc|registration}}
==TemplateData==
{{Warning |image=Stop hand nuvola.svg |This section contains configuration data used by editing tools and automated bots. Changes to this data can result in widespread and unintended effects. For more information see [[Help:Citation Style 1#TemplateData]]}}
{{TemplateData header}}
{{#invoke:cs1 documentation support|template_data_validate|{{ROOTPAGENAME}}}}
<templatedata>
<templatedata>
{
{