Template:Cite web/doc: Difference between revisions

From All Skies Encyclopaedia
imported>Eubulides
(Dates are no longer expected to be in ISO format.)
imported>Sladen
(rv undiscussed change. Please take to talk. Undid revision 270157198 by Eubulides (talk))
Line 63: Line 63:
*'''title''': Title of online item.
*'''title''': Title of online item.
*'''''Choose a date format''''' from the following options that matches the main text of the article.
*'''''Choose a date format''''' from the following options that matches the main text of the article.
:*'''accessdate''': Full date when item was accessed. ''Must not be wikilinked''.
:*'''accessdate''': Full date when item was accessed, in [[ISO 8601]] YYYY-MM-DD format, for example "accessdate = {{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}". ''Must not be wikilinked''.
:*'''dateformat''': Formats the date in a consistent fashion. Possible values: none, dmy, ymd, mdy, iso. Preceding the value with an 'l' (e.g. liso, ldmy) will wikilink the date. See [[Template:Date]].
:*'''dateformat''': Formats the date in a consistent fashion. Possible values: none, dmy, ymd, mdy, iso. Preceding the value with an 'l' (e.g. liso, ldmy) will wikilink the date. See [[Template:Date]].


Line 71: Line 71:
**'''authorlink''' works either with '''author''' or with '''last''' & '''first''' to link to the appropriate wikipedia article. Does not work with URLs.
**'''authorlink''' works either with '''author''' or with '''last''' & '''first''' to link to the appropriate wikipedia article. Does not work with URLs.
**'''coauthors''': allows additional authors
**'''coauthors''': allows additional authors
*'''date''': Full date of publication in the same format as the main text of the article. Must not be wikilinked.
*'''date''': Full date of publication in the same format as the main text of the article. If in [[ISO 8601]] YYYY-MM-DD format, e.g. ''2006-02-17'', must not be wikilinked; it will be linked automatically.''
**OR: '''year''': Year of publication, and '''month''': Name of the month of publication. If you also have the day, use ''date'' instead. Must not be wikilinked.
**OR: '''year''': Year of publication, and '''month''': Name of the month of publication. If you also have the day, use ''date'' instead. Must not be wikilinked.
*'''format''': Format, e.g. PDF. HTML implied if not specified.
*'''format''': Format, e.g. PDF. HTML implied if not specified.
Line 83: Line 83:
**'''Doilabel''': If the doi contains some characters that must be [[Percent-encoding|escaped]], use "doilabel" for the unescaped version. See {{tl|doi}}: "id" is equivalent to "doi" and "label" is "doilabel"
**'''Doilabel''': If the doi contains some characters that must be [[Percent-encoding|escaped]], use "doilabel" for the unescaped version. See {{tl|doi}}: "id" is equivalent to "doi" and "label" is "doilabel"
*'''archiveurl''': The URL of an [[Web archiving|archived]] copy of the page, if (or in case) the url becomes unavailable. Typically used to refer to services like [[WebCite]] and [[Internet Archive|The Internet Archive]]. Requires '''archivedate'''.
*'''archiveurl''': The URL of an [[Web archiving|archived]] copy of the page, if (or in case) the url becomes unavailable. Typically used to refer to services like [[WebCite]] and [[Internet Archive|The Internet Archive]]. Requires '''archivedate'''.
*'''archivedate''': Date when the item was archived (requires '''archiveurl'''). Must not be wikilinked.
*'''archivedate''': Date when the item was archived (requires '''archiveurl'''), in [[ISO 8601]] YYYY-MM-DD format, e.g. ''2006-02-17''. Must not be wikilinked.
*'''quote''': Relevant quote from online item.
*'''quote''': Relevant quote from online item.
====Duplicate periods====
====Duplicate periods====

Revision as of 12:09, 12 February 2009

This template is used to cite online sources in Wikipedia articles. {{Cite news}} can also be used when citing a news source; for general information about citations in Wikipedia articles, see Wikipedia:cite sources.

A general discussion of the use of templates for adding citation of open-source web content to Wikipedia articles is available at citation templates.

Usage

Common forms

Common form (with current date)

{{cite web |url= |title= |accessdate=2025-02-25 |work= |publisher= |date= }}

Using last, first and coauthor(s) (with current date)

{{cite web |url= |title= |accessdate=2025-02-25 |last= |first= |coauthors= |date= |work= |publisher=}}

Using author (with current date)

{{cite web |url= |title= |accessdate=2025-02-25 |author= |date= |work= |publisher=}}

Using non-linked retrieved date, last, first (month day)

{{cite web |url= |title= |accessdate=2025-02-25 |last= |first= |date= |work= |publisher= |dateformat=lmdy}}

Using linked retrieved date, author (month day)

{{cite web |url= |title= |accessdate=2025-02-25 |author= |date= |work= |publisher= |dateformat=mdy}}

Using archived version

{{cite web |url= |title= |accessdate= 2025-02-25 |author= |date= |work= |publisher= |archiveurl= |archivedate= }}

All parameters

When copying all parameters, in either horizontal or vertical layout, delete those you don't need.

All parameters, horizontal layout

{{cite web |url= |title= |accessdate= |author= |last= |first= |authorlink= |coauthors= |date= |year= |month= |format= |work= |publisher= |location= |pages= |language= |doi= |archiveurl= |archivedate= |quote= |dateformat=}}

All parameters, vertical layout
{{cite web
| url         = 
| title       = 
| accessdate  = 
| author      = 
| last        = 
| first       = 
| authorlink  = 
| coauthors   = 
| date        = 
| year        = 
| month       = 
| format      = 
| work        = 
| publisher   = 
| location    =
| pages       = 
| language    = 
| doi         = 
| archiveurl  = 
| archivedate = 
| dateformat  =
| quote       = 
}}

Required parameters

  • url: URL of online item. Start the url with the communications protocol e.g. http://.
  • title: Title of online item.
  • Choose a date format from the following options that matches the main text of the article.
  • accessdate: Full date when item was accessed, in ISO 8601 YYYY-MM-DD format, for example "accessdate = 2025-02-25". Must not be wikilinked.
  • dateformat: Formats the date in a consistent fashion. Possible values: none, dmy, ymd, mdy, iso. Preceding the value with an 'l' (e.g. liso, ldmy) will wikilink the date. See Template:Date.

Optional parameters

  • author: Author
    • last works with first to produce last, first
    • authorlink works either with author or with last & first to link to the appropriate wikipedia article. Does not work with URLs.
    • coauthors: allows additional authors
  • date: Full date of publication in the same format as the main text of the article. If in ISO 8601 YYYY-MM-DD format, e.g. 2006-02-17, must not be wikilinked; it will be linked automatically.
    • OR: year: Year of publication, and month: Name of the month of publication. If you also have the day, use date instead. Must not be wikilinked.
  • format: Format, e.g. PDF. HTML implied if not specified.
  • work: If this item is part of a larger "work", such as a book, periodical or website, write the name of that work.
  • publisher: Publisher, if any—for example if the website is hosted by a government service, educational institution, or company
    • location: Geographical place of publication.
  • pages: pp. 5–7: first page and optional last page. This is for listing the pages relevant to the citation, not the total number of pages in the book.
  • language: language of publication (don't specify "English" as this is the default).
  • doi: A digital object identifier for the document, such as 10.1038/news070508-7
    • Doilabel: If the doi contains some characters that must be escaped, use "doilabel" for the unescaped version. See {{doi}}: "id" is equivalent to "doi" and "label" is "doilabel"
  • archiveurl: The URL of an archived copy of the page, if (or in case) the url becomes unavailable. Typically used to refer to services like WebCite and The Internet Archive. Requires archivedate.
  • archivedate: Date when the item was archived (requires archiveurl), in ISO 8601 YYYY-MM-DD format, e.g. 2006-02-17. Must not be wikilinked.
  • quote: Relevant quote from online item.

Duplicate periods

By default, cite web separates fields with periods, so don't encode a field ending with a period or a duplicate period will be added. Example: publisher=Camelot, Inc will correctly show as Camelot, Inc. but publisher=Camelot, Inc. will incorrectly show as Camelot, Inc..

Examples

Some standard use cases
  • {{cite web |author=Doe, John |title=My favorite things part II |publisher=Open Publishing |date=2005-04-30 |work=Encyclopedia of things |url=http://www.example.org/ |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |author=Doe, John |title=My favorite things part II |date=2005-04-30 |work=Encyclopedia of things |url=http://www.example.org/ |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |author=Doe, John |title=My favorite things part II |date=2005-04-30 |url=http://www.example.org/ |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |author=Doe, John |title=My favorite things part II |url=http://www.example.org/ |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |title=My favorite things part II |url=http://www.example.org/ |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |url=http://www.nfl.com/fans/ |title=Digest of rules |publisher= National Football League |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
Using format
  • {{cite web |title=List of psychotropic substances under international control |publisher=International Narcotics Control Board |url=http://www.incb.org/pdf/e/list/green.pdf |format=PDF |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
language
  • {{cite web |author=Joliet, François |title=Honnit soit qui mal y pense |date=2005-04-30 |url=http://www.example.org/ |accessdate=2005-07-06 |language=French }}
    Lua error: bad argument #1 to "get" (not a valid title).
coauthors
  • {{cite web |first=John |last=Doe |coauthors=Smith, Peter; Smythe, Jim |title=My favorite things part II |publisher=Open Publishing |date=2005-04-30 |work=Encyclopedia of things |url=http://www.example.org/ |accessdate=2006-05-16 }}
    Lua error: bad argument #1 to "get" (not a valid title).
No author
  • {{cite web |title=My favorite things part II |publisher=Open Publishing |date=2005-04-30 |work=Encyclopedia of things |url=http://www.example.org/ | accessdate=2006-05-16 }}
    Lua error: bad argument #1 to "get" (not a valid title).
No author, no publisher
  • {{cite web |title=My favorite things part II |date=2005-04-30 |work=Encyclopedia of things |url=http://www.example.org/ |accessdate=2005-07-06 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |title=My favorite things part II |date=2005-04-30 |url=http://www.example.org/ |accessdate=2005-07-06}}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |title=List of psychotropic substances under international control |date=2005-04-30 |url=http://www.incb.org/pdf/e/list/green.pdf |format=PDF |accessdate=2005-07-06 |language=Greek }}
    Lua error: bad argument #1 to "get" (not a valid title).
Using "archiveurl" and "archivedate" for webpages that have been archived
  • {{cite web |title=List of psychotropic substances under international control |date=2005-04-30 |url=http://www.incb.org/pdf/e/list/green.pdf |format=PDF |accessdate=2005-07-06 |archiveurl=http://www.archive.org/2005-09-11/www.incb.org/pdf/e/list/green.pdf |archivedate=2005-09-11 }}
    Lua error: bad argument #1 to "get" (not a valid title).
  • {{cite web |url=http://joanjettbadrep.com/cgi-bin/fullStory.cgi?archive=currnews&story=20060405-01shore.htm |title=Interview with Maggie Downs |date=2006-03-31 |publisher=The Desert Sun |archiveurl=http://72.14.207.104/search?q=cache:JAxf4v-pQmgJ:joanjettbadrep.com/cgi-bin/fullStory.cgi%3Farchive%3Dcurrnews%26story%3D20060405-01shore.htm |archivedate=2006-04-26 }}
    Lua error: bad argument #1 to "get" (not a valid title).
Using "quote"
  • {{cite web |title=My favorite things part II |work=Encyclopedia of things |url=http://www.example.org/ |accessdate=2005-07-06 |quote=Lorem ipsum dolor. }}
    Lua error: bad argument #1 to "get" (not a valid title).
Omitting the "title" in error
  • {{cite web |work=Encyclopedia of things |url=http://www.example.org/ |accessdate=2005-07-06 |quote=Lorem ipsum dolor. }}
    Lua error: bad argument #1 to "get" (not a valid title).