| 879 | == Adding IDs to any item == |
| 880 | Any item in a HTML page may be the target for a link (see http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2.3). |
| 881 | |
| 882 | Since 0.12 there is a simple format for adding these `id`s (also known as anchors) |
| 883 | {{{ |
| 884 | [=#point1] |
| 885 | }}} |
| 886 | |
| 887 | This sytax was chosen to match the format for explicitly naming the header id [#Headings documented above]. For example.. |
| 888 | {{{ |
| 889 | == Long title == #title |
| 890 | }}} |
| 891 | |
| 892 | It's also very close to the syntax for the corresponding link to that anchor: |
| 893 | {{{ |
| 894 | [#point1] |
| 895 | }}} |
| 896 | |
| 897 | Optionally, a label can be given to the anchor: |
| 898 | {{{ |
| 899 | [[=#point1 '''Point 1''']] |
| 900 | }}} |
| 901 | |
| 902 | ||= Wiki Markup =||= Display =|| |
| 903 | |---------------------------------- |
| 904 | {{{#!td |
| 905 | {{{ |
| 906 | [#point1 jump to the first point] |
| 907 | |
| 908 | ... |
| 909 | |
| 910 | Point1: [=#point1] Jump here |
| 911 | }}} |
| 912 | }}} |
| 913 | {{{#!td |
| 914 | [#point1 jump to the first point] |
| 915 | |
| 916 | ... |
| 917 | |
| 918 | Point1: [=#point1] Jump here |
| 919 | }}} |
| 920 | |
| 921 | For more complex anchors (e.g. when a custom title is wanted), one can use the Span macro, e.g. `[[span(id=point1, class=wikianchor, title=Point 1, ^(1)^)]]`. |
| 922 | |
| 923 | |