Template documentation[view] [edit] [history] [purge]

UsageEdit

Uses a piece of text as an invisible anchor (parameter 1). Highlights with a coloured background:

  1. the text passed as parameter 2;
  2. the whole paragraph containing the invisible anchor, if parameter 2 is not passed to the template.
{{Anchor2|anchor name|text to highlight}}

ExampleEdit

Using parameter 2 (common use)
{{Template:Anchor2|Here|Here there is an invisible anchor}}

Here there is an invisible anchor, hidden into "Here" word. The text "Here there is an invisible anchor" at the beginning will be highlighted when a link to that anchor is followed.

This is another example. Only the anchor (the "This" word) will be highlighted.

Try these links:

Using parameter 1 only
{{Template:Anchor2|xxxxx}}

Now an example using param 1 only (the name of anchor). All the paragraph will be highlighted.

But this row (that is contained into a different paragraph) will not be highlighted.

Try this link:

NoticeEdit

Highlighting is only rendered if you add this code to your vector.css (or/and your monobook.css):


span.InvisibleAnchor:target {background-color:#DEF;} /* highlights the "invisible anchor" obtained using Template:Anchor2 */

Unluckily, css3 is needed to show highlighting; it will be shown under Firefox only. :-(

See alsoEdit