Links provide an alternative to using multiple event handlers to navigate between cards and decks. The main difference between links and <do> elements is that links are usually rendered in-line, whereas <do> elements are most often assigned to a labeled soft key at the bottom or top of the display. WML provides two ways to create a link, one a shorthand for the other. The <anchor> element is the most flexible way to create a link, and the <a> element is a shorter version with an implicit <go> element. Consider the following WML:
<anchor title ="Staff">Staff Details <go href="http://gov.ns.ca/health/staff.cgi"/> </anchor>
This creates a link, which displays 'Staff Details' as the link anchor with a link to the 'staff' server-side script. The 'title' attribute may be used by a user agent to display additional link information, but this is not mandatory. A shorthand version of the preceding anchor code looks like the following:
<a title ="Staff" href="http://gov.ns.ca/health/staff.cgi"> Staff Details </a>
Overall, the shorthand <a> tag is preferred to the <anchor> because it can be more compactly coded for transmission to the wireless device.
Links Including Embedded Image
The Link label references a soft key that, when pressed by a user, results in navigation to the target URL. Cursor keys are used to select different links. Note the use of an embedded image within the last <a> element.