3,860
edits
Changes
-
==Usage==
{{tlf|'''anchor'''}} inserts one or more HTML fragment identifiers, commonly known as ''anchor names'', at the location where you put the template in a page. It does so by using the {{samp|id}} attribute within {{tag|span|o}} tags:
These locations can then be linked to using the in-page wikilink syntax {{code|<nowiki>[[#Anchor name|…]]</nowiki>}}.
! Meaning
|-
| {{align| "}}
| {{code|&quot;}} <br>{{code|&#34;}}
| {{align| {{N/A}}}}
| Quotation mark
|-
| {{align| #}}
| {{code|&#35;}}
| {{align| {{N/A}}}}
| Number sign
|-
| {{align| |}}
| {{code|&#124;}}
| {{align| {{tn|!}}}}
| Vertical bar
|-
| {{align| =}}
| {{code|&#61;}}
| {{align| {{tn|{{=}}}}}}
| Equals sign
|}
==Examples==
;<big>Correct use</big>
The links to the targets in the table can be found under [[#Syntax|''Syntax'']] > ''Example anchors'', above.
{| class="wikitable" style="background-color: white;"
! Case
! What you write
! style="width: 200px;" | What you see! style="width: 300px;" | Comments
|-
| Basic use
| {{anchor|Custom anchor name}} <span id="Example6"></span><span style="font: 21px Fira Sans; text-decoration: underline;">Section title B</span>
| As noted under [[#Limitations|Limitations]] above, it may be preferable to use direct HTML rather than the template within section titles.
|}
;<big>Incorrect use</big>
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you write !! What you see
|-
| > 10 anchors || {{tlc|anchor|1|2|3|4|5|6|7|8|9|10|11}} || {{anchor|1|2|3|4|5|6|7|8|9|10|11}}
|-
| No parameter || {{tlc|anchor}} || {{anchor}}
|}
* [[Wikipedia:HTML attribute|''HTML attribute'']] on English Wikipedia.
* [[Wikipedia:Span and div|''Span and div'']] on English Wikipedia.
[[Category:User sandboxes]]