<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.limswiki.org/index.php?action=history&amp;feed=atom&amp;title=Template%3AAnchor%2Fdoc</id>
	<title>Template:Anchor/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.limswiki.org/index.php?action=history&amp;feed=atom&amp;title=Template%3AAnchor%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Template:Anchor/doc&amp;action=history"/>
	<updated>2026-04-04T13:56:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://www.limswiki.org/index.php?title=Template:Anchor/doc&amp;diff=16392&amp;oldid=prev</id>
		<title>Shawndouglas at 18:45, 19 November 2014</title>
		<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Template:Anchor/doc&amp;diff=16392&amp;oldid=prev"/>
		<updated>2014-11-19T18:45:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:45, 19 November 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l103&quot;&gt;Line 103:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 103:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- CATEGORIES AND INTERWIKIS LINKS HERE, THANKS --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;!-- CATEGORIES AND INTERWIKIS LINKS HERE, THANKS --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Wikipedia &lt;/del&gt;formatting and function templates]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;LIMSwiki &lt;/ins&gt;formatting and function templates]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key limswiki:diff::1.12:old-16387:rev-16392 --&gt;
&lt;/table&gt;</summary>
		<author><name>Shawndouglas</name></author>
	</entry>
	<entry>
		<id>https://www.limswiki.org/index.php?title=Template:Anchor/doc&amp;diff=16387&amp;oldid=prev</id>
		<title>Shawndouglas: Updated.</title>
		<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Template:Anchor/doc&amp;diff=16387&amp;oldid=prev"/>
		<updated>2014-11-19T18:33:40Z</updated>

		<summary type="html">&lt;p&gt;Updated.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{lua|Module:Anchor}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS LINKS AT THE END OF THIS PAGE --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The template &amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;[[{{ns:Template}}:{{BASEPAGENAME}}|{{lc:{{BASEPAGENAME}}}}]]&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt; inserts one or more [[Fragment identifier|HTML fragment identifiers]] (anchor names) in a page. Those locations can then be linked to using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[#Location|…]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; syntax. {{#ifeq:{{BASEPAGENAME}}|Visible anchor|&amp;amp;nbsp;Unlike {{tl|Anchor}}, the first parameter will be visible text on the page.|}} (Usually the first letter of the ''location'' is capitalised to reflect the common capitalisation used in section headers – see [[MOS:HEAD]].)&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
1. &amp;lt;code style=&amp;quot;color:darkgreen;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;{{lc:{{BASEPAGENAME}}}}|Foo&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
: could be linked to with &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[[#Foo|…]]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; from within the same article, &lt;br /&gt;
: or it could be linked to with {{nowrap|&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;''&amp;lt;small&amp;gt;Article name&amp;lt;/small&amp;gt;''#Foo&amp;lt;nowiki&amp;gt;|…]]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;}} from other articles and from redirects.&lt;br /&gt;
&lt;br /&gt;
2. Anchors can be more suitable for inter-article linking than section titles are. For example: &lt;br /&gt;
:{{nowrap|1=&amp;lt;code style=&amp;quot;color:dimgray;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt;&amp;lt;span&amp;gt;{{sp}}&amp;lt;/span&amp;gt;&amp;lt;code style=&amp;quot;color:darkgreen;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;{{lc:{{BASEPAGENAME}}}}&amp;lt;nowiki&amp;gt;|Foo}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;span&amp;gt;{{sp}}&amp;lt;/span&amp;gt;Section title &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;}} &lt;br /&gt;
:Here, links via {{nowrap|1=&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[[&amp;lt;/nowiki&amp;gt;''Article name''#Foo&amp;lt;nowiki&amp;gt;]]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;}} would remain valid even if the section were renamed. (Note that the anchor is placed ''before'' the section name; otherwise browsers may hide the section title from view.) However, as noted under [[#Limitations|Limitations]] below, it may be preferable to use direct HTML rather than the template within section titles: &lt;br /&gt;
:{{nowrap|1=&amp;lt;code style=&amp;quot;color:dimgray;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt;&amp;lt;span&amp;gt;{{sp}}&amp;lt;/span&amp;gt;&amp;lt;code style=&amp;quot;color:darkgreen;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span id=&amp;quot;Foo&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;span&amp;gt;{{sp}}&amp;lt;/span&amp;gt;Section title &amp;lt;nowiki&amp;gt;==&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;}} &lt;br /&gt;
&lt;br /&gt;
3. The template can be used to create multiple anchors with a single call. For example, &lt;br /&gt;
: {{nowrap|1=&amp;lt;code style=&amp;quot;color:darkgreen;&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;{{lc:{{BASEPAGENAME}}}}&amp;lt;nowiki&amp;gt;|Foo|Bar|baz}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;}} &lt;br /&gt;
:will create three anchors that can then be linked to with &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[[#Foo]]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[[#Bar]]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;[[#baz]]&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Limitations ===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;float:right&amp;quot;&lt;br /&gt;
!Character&lt;br /&gt;
![[Character entity reference|Code]]&lt;br /&gt;
!Template&lt;br /&gt;
!Meaning&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;quot;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;amp;amp;quot;&amp;lt;/code&amp;gt; &amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;&amp;amp;amp;#34;&amp;lt;/code&amp;gt;&lt;br /&gt;
|{{N/a}}&lt;br /&gt;
|(double)&amp;amp;nbsp;[[quotation mark]]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#35;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;amp;amp;#35;&amp;lt;/code&amp;gt;&lt;br /&gt;
|{{N/a}}&lt;br /&gt;
|[[Number sign|hash]]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#124;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;amp;amp;#124;&amp;lt;/code&amp;gt;&lt;br /&gt;
|{{tl|!}}&lt;br /&gt;
|[[Vertical bar|pipe]]&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp;#61;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;amp;amp;#61;&amp;lt;/code&amp;gt;&lt;br /&gt;
|{{tl|{{=}}}}&lt;br /&gt;
|[[Equals sign|equals]]&lt;br /&gt;
|}&lt;br /&gt;
* Anchor names that contain any character shown in the table on the right will not work as expected. However, any of these characters can be replaced with the &amp;quot;&amp;amp;amp;#&amp;quot; codes shown for them here. Or, the pipe symbol and equals sign can be worked around with {{tl|!}} and {{tl|{{=}}}}, respectively. Markup code such as {{tag|sup|o}} and {{tag|sub|o}} (superscript and subscript) cannot be used. Most other characters, including white space and punctuation, are not a problem.&lt;br /&gt;
* Anchor names should be unique on a page, and should not duplicate any heading titles. Duplicate anchors will not work as expected since the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#location&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; links go to the first anchor with that name. Duplicate anchors result in invalid HTML; you can check for duplicate anchors by running the page through the [[W3C Markup Validation Service]].&lt;br /&gt;
* If the template is added to a section title then the code will appear in the edit summary window when that section is edited, as in {{nowrap|1=&amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;/* {{anchor|Issues}}Limitations */ New issue&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot;}}. Also, when the section is saved, browsers may not return to the section. Consider using &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;span id=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; directly, rather than using the anchor template, when in a section title. &lt;br /&gt;
* Anchor links are case sensitive in some browsers, so treat all anchor links as case sensitive.&lt;br /&gt;
&lt;br /&gt;
===Use in tables===&lt;br /&gt;
Anchors may be used within tables, subject to certain restrictions. The {{tlx|anchor}} template may be used in the caption and cells of a table, but not those portions of a table that are outside the caption and cells. It is used on the table's caption thus:&amp;lt;source enclose=div lang=text&amp;gt;|+ {{anchor|FooX}} A table caption&amp;lt;/source&amp;gt; and the following forms of cell are valid:&amp;lt;source enclose=div lang=text&amp;gt;!{{anchor|Foo1}} A header cell&lt;br /&gt;
!style=&amp;quot;background:white;&amp;quot; |{{anchor|Foo2}} A header cell with styling&lt;br /&gt;
|{{anchor|Foo3}} A data cell&lt;br /&gt;
|rowspan=2 |{{anchor|Foo4}} A data cell spanning two rows&amp;lt;/source&amp;gt; You need to ensure that the {{tlx|anchor}} is not in that portion of the markup intended for the classes, styles etc. Thus, {{tlx|anchor}} cannot be placed anywhere on lines that begin with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{|&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (start of table) or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;|-&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; (new row), and the following forms of cell are not valid:&amp;lt;source enclose=div lang=text&amp;gt;!{{anchor|Foo1}} |A header cell&lt;br /&gt;
!style=&amp;quot;background:white;&amp;quot; {{anchor|Foo2}} |A header cell with styling&lt;br /&gt;
|{{anchor|Foo3}} |A data cell&lt;br /&gt;
|rowspan=2 {{anchor|Foo4}} |A data cell spanning two rows&amp;lt;/source&amp;gt; If it is necessary for an anchor to be in any of these positions, a different technique is used - the &amp;lt;code&amp;gt;id=&amp;lt;/code&amp;gt; attribute. This is placed in that portion of the markup where the classes, styles etc. may be used, as follows:&amp;lt;source enclose=div lang=text&amp;gt;{| id=FooX class=wikitable&lt;br /&gt;
|- id=FooY&lt;br /&gt;
!id=Foo1 |A header cell&lt;br /&gt;
!style=&amp;quot;background:white;&amp;quot; id=Foo2 |A header cell with styling&lt;br /&gt;
|id=Foo3 |A data cell&lt;br /&gt;
|rowspan=2 id=Foo4 |A data cell spanning two rows&amp;lt;/source&amp;gt; The &amp;lt;code&amp;gt;id=&amp;lt;/code&amp;gt; attribute may appear before, between or after any other attributes that may be present, but only one &amp;lt;code&amp;gt;id=&amp;lt;/code&amp;gt; attribute may be used in each of these areas.&lt;br /&gt;
&lt;br /&gt;
=== TemplateData ===&lt;br /&gt;
{{TemplateDataHeader}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;{&lt;br /&gt;
&amp;quot;description&amp;quot;: &amp;quot;The template {{anchor}} inserts one or more HTML anchors in a page. Those locations can then be linked to using [[#location|…]] syntax.  The parameters here are for convenience; no parameter name is required in the template itself.&amp;quot;,&lt;br /&gt;
&amp;quot;params&amp;quot;: {&lt;br /&gt;
  &amp;quot;1&amp;quot;: {&lt;br /&gt;
    &amp;quot;label&amp;quot;: &amp;quot;First anchor&amp;quot;,&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;First anchor; Only the first anchor is required.&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
    &amp;quot;required&amp;quot;: true&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;2&amp;quot;: {&lt;br /&gt;
    &amp;quot;label&amp;quot;: &amp;quot;Second anchor&amp;quot;,&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Second anchor.&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
    &amp;quot;required&amp;quot;: false&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;3&amp;quot;: {&lt;br /&gt;
    &amp;quot;label&amp;quot;: &amp;quot;Third anchor&amp;quot;,&lt;br /&gt;
    &amp;quot;description&amp;quot;: &amp;quot;Third anchor.  For additional anchors, just type in 4 as the parameter name for the next, 5 for the next after that, and so on.&amp;quot;,&lt;br /&gt;
    &amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
    &amp;quot;required&amp;quot;: false&lt;br /&gt;
  }&lt;br /&gt;
}}&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== See also ===&lt;br /&gt;
* {{#ifeq:{{BASEPAGENAME}}|Visible anchor|{{tl|Anchor}}|{{tl|Visible anchor}}}}&lt;br /&gt;
* {{tl|Anchored list}}&lt;br /&gt;
* {{tl|Anchor comment}}&lt;br /&gt;
* {{tl|Shortcut}}&lt;br /&gt;
* [[WP:ANCHOR]]&lt;br /&gt;
* [[WP:TARGET]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox||&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CATEGORIES AND INTERWIKIS LINKS HERE, THANKS --&amp;gt;&lt;br /&gt;
[[Category:Wikipedia formatting and function templates]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Shawndouglas</name></author>
	</entry>
</feed>