Difference between revisions of "Template:Highlighted anchor/doc"
Jump to navigation
Jump to search
imported>JsfasdF252 |
imported>JsfasdF252 (Spelling) |
||
| Line 3: | Line 3: | ||
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> | ||
== Usage == | == Usage == | ||
| − | Details are to be written, but basically when you add {{tlx| | + | Details are to be written, but basically when you add {{tlx|highlighted anchor|some text}} inside the visible part of {{tl|visible anchor}} or inside any potential target (i.e a DOM element that has the :target css modifier) then when the target is reached (using a link with a fragment that is identical to its id) the text "some text" will be highlighted with a bluish grey background. |
In the source code, for example, we have | In the source code, for example, we have | ||
Revision as of 21:29, 4 December 2020
| 40px | This is a documentation subpage for Template:Highlighted anchor. It contains usage information, categories and other content that is not part of the original template page. |
Script error: No such module "Uses TemplateStyles".
Usage
Details are to be written, but basically when you add {{highlighted anchor|some text}} inside the visible part of {{visible anchor}} or inside any potential target (i.e a DOM element that has the :target css modifier) then when the target is reached (using a link with a fragment that is identical to its id) the text "some text" will be highlighted with a bluish grey background.
In the source code, for example, we have
[[#testlink|Click on me to see the effect]]
{{visible anchor
|testlink
|text=This is the visible text of the anchor and {{highligthed anchor|this is the highligthed part of it}}
}}This is rendered as follows:
See also
- {{Visible anchor}}
- {{Anchor}}
- {{Anchored list}}
- {{Shortcut}}
- Help:Link § Section linking (anchors) (Shortcut: WP:ANCHOR)