Help:AnchorEdit This Page

From FamilySearch Wiki

(Difference between revisions)
m (Fm)
(No wiki)
 
Line 3: Line 3:
 
== Manually Linking to Anchors  ==
 
== Manually Linking to Anchors  ==
  
Also, the section anchors can be manually linked directly to one section within a page.  The HTML code generated at the beginning of this section, for example, is:  <a name="Manually Linking to Anchors" id="Manually Linking to Anchors"></a>
+
Also, the section anchors can be manually linked directly to one section within a page. The HTML code generated at the beginning of this section, for example, is: <a name="Manually Linking to Anchors" id="Manually Linking to Anchors">
  
== Manually Linking to Anchors ==
+
== Manually Linking to Anchors ==
  
A link to this section (Manually Linking to Anchors) looks like this:  
+
A link to this section (Manually Linking to Anchors) looks like this: &nbsp;<nowiki>[[Help:Section#Manually_Linking_to_Anchors|Manually Linking to Anchors]]</nowiki>
  
[[Help:Section#Manually_Linking_to_Anchors|Manually Linking to Anchors]] To link to a section in the same page you can use [[#section_name|displayed text]], and to link to a section in another page [[Page name#section_name|displayed text]].
+
and displays like this: &nbsp;[[Help:Section#Manually_Linking_to_Anchors|Manually Linking to Anchors]]  
 +
 
 +
To link to a section in the same page you can use: &nbsp;<nowiki> [[#section_name|displayed text]]</nowiki>,  
 +
 
 +
and to link to a section in another page: &nbsp;<nowiki>[[Page name#section_name|displayed text]]</nowiki>.

Latest revision as of 05:47, 24 September 2013

In the HTML code for each section there is an anchor HTML element "a" with both "name" and "id" attributes holding the section title. This enables linking directly to sections. These section anchors are automatically used by MediaWiki when it generates a table of contents (TOC) for the page, and therefore when a section heading in the TOC is clicked, it will jump to the section.

Manually Linking to Anchors

Also, the section anchors can be manually linked directly to one section within a page. The HTML code generated at the beginning of this section, for example, is: <a name="Manually Linking to Anchors" id="Manually Linking to Anchors">

Manually Linking to Anchors

A link to this section (Manually Linking to Anchors) looks like this:  [[Help:Section#Manually_Linking_to_Anchors|Manually Linking to Anchors]]

and displays like this:  Manually Linking to Anchors

To link to a section in the same page you can use:   [[#section_name|displayed text]],

and to link to a section in another page:  [[Page name#section_name|displayed text]].

  • This page was last modified on 24 September 2013, at 05:47.
  • This page has been accessed 420 times.