This template is used on 17,000+ pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template is intended to be useful for creating links to "diffs"; that is, links to pages that show the differences between two versions of a wiki page.
Every version of a page has a revision ID, which you can find from the history of the page by looking at the timestamp link for the edit. The timestamp link is in this form: http[s]://en.wikipedia.org/w/index.php?title=SomePageName&oldid=442212827
The number after oldid= is the revision ID.
Given one or two revision IDs, you can construct links to several types of diffs.
Only the diff parameter is required; all other parameters are optional. Omitted parameters must be empty (by using a double pipe). You can also use the named parameters title, diff, oldid, and label.
Examples
Below each example in the left-hand column is the pseudocode for that example in brown italics and indented. Elements that should be entered literally are in brown bold underlined italics. When a parameter is left blank, the resulting two adjacent pipes are underlined (but not bolded): ||.
Code
Output
{{Diff|Main Page|prev|204901573|Diff between a numbered version and the previous version}}