Mediawiki link within the page to a specific place, rather than a section

Use the following to create the anchor:

<div id="NameOfAnchorHere">optional text</div>

which can be referenced as:

[[#NameOfAnchorHere| test]]

More information about linking in MediaWiki can be found here


And just to explain what's going on with {{#invoke:anchor|main}}: that's using Lua code in the Module namespace to generate the anchor.

Note that it eventually uses

<span id="NameOfAnchorHere">optional text</span>

which, I think, is nearly equivalent of <div style="display:inline;">, I think.