GuideML - LINK Tag

3 Conversations

The <LINK> tag lets you create clickable links in your articles.

If you want a link to appear in the 'Article Data' box but don't want to put a link in the body of your article, then you should use the <REFERENCES> tag.

Syntax and Usage for Linking to h2g2 Pages

<LINK H2G2="A1234567">Name of article</LINK>
<LINK H2G2="A1234567"/>

This version is used to link to articles within DNA (ie all pages except Personal Spaces).

  • By linking to an h2g2 A-number page such as A123456, this tag also puts an article in the 'Referenced Articles' section of the Article Data box, the text of which will be the article's title.

  • If the closed version of the tag is used, then the text shown for the link is the title of the referenced article. This enables you to put in links to articles that might have their titles changed, without having to worry about changing the GuideML that links to them.

Syntax and Usage for Linking to External Websites

<LINK HREF="Full website URL" TITLE="Title of the page you're linking to" >The text that you want to form the link itself</LINK>

This version is used to link to websites outside h2g2.

  • To link to a website outside h2g2, you must include a complete URL, normally starting with http://. The tag will put an entry in the 'Referenced Sites' or 'Related BBC Pages' section of the Article Data box, the text of which will be the Title of the page you're linking to - provided that you've remembered to include the TITLE attribute in the link! If you need to include a & character in your URL, then type it in as &amp; like this: <LINK HREF="http://www.example.com/search.cgi?term=h2g2&amp;case=u">.

  • By using the TITLE attribute in the link, the tag will automatically put an entry in the 'Referenced Sites' or 'Related BBC Pages' section of the Article Data box, using the title of the page you're linking to as the text for the reference link.

  • There is no closed version of this tag available, as it's not practical to dynamically search for titles of off-site web pages.

Syntax and Usage for Linking to h2g2 Researchers

<LINK BIO="...userid..." >...text...</LINK>
<LINK BIO="...userid..." />

This version is used to link to Researchers' Personal Spaces.

  • The ...userid... argument is of the form U123456 and contains that Researcher's unique ID number. The tag will put an entry in the 'Referenced Researchers' section of the Article Data box, the text of which will be the Researcher's name.

  • If the closed version of the tag is used, then the text shown for the link is the name of the referenced Researcher. This enables you to put in links to Researchers without worrying whether they'll change their names.

Known Issues

No 'Referenced Articles' Link for Named Articles, Forums, Categories or Anchored Articles

Currently linking to named articles, Forums or Categories with links like <LINK H2G2="GuideML-Clinic"> or <LINK H2G2="F123456">, or anchored articles like <LINK H2G2="A123456#anchor"> fails to put anything in the 'Referenced Articles' section.

Empty 'Referenced Articles' Sections

If a number of named articles are linked to from an article, then in some circumstances empty 'Referenced' sections are displayed with a header but no links.

Closed Tag with Named Articles, Forums, Categories

Linking to named articles, Forums or categories with the closed version of the tag, as in <LINK H2G2="GuideML-Clinic"/>, does not work properly. It simply puts an 'A' as the link text, though the link will work.

Effects in Links

If the text between <LINK> tags contains text effects such as italics, then that part of the text will not be displayed in the Article Data box.

Wrong Attribute

Links will not necessarily work if the wrong attribute is used, so please don't use tags like <LINK HREF="/A123456"> or <LINK H2G2="U123456">.

Examples of Correct Link Code

Example One

This is a numbered-article link to the h2g2 article on Preparing a Chicken.

<P>This is a numbered-article link to the article on <LINK H2G2="A260281">Preparing a Chicken</LINK>.</P>

Example Two

This is a named-article link to the GuideML Clinic.

<P>This is a named-article link to the <LINK H2G2="GuideML-Clinic">GuideML Clinic</LINK>.</P>

Example Three

This is an external link to the BBC Homepage and the link is displayed in the 'Referenced Sites' section as 'Click here to visit the BBC!'.

<P>This is an external link to the <LINK TITLE="Click here to visit the BBC!" HREF="http://www.bbc.co.uk/">BBC Homepage</LINK> and the link is displayed in the 'Referenced Sites' section as 'Click here to visit the BBC!'.</P>

Example Four

This is a bio-link to the Editor's Personal Space.

<P>This is a bio-link to the <LINK BIO="U284">Editors' Personal Space</LINK>.</P>

Further Information


Bookmark on your Personal Space


Entry

A957369

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

Credits

References

h2g2 Entries

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more