- WML2 - Tutorial
- WML - DTD
- WML - Template
- WML - Timer
- WML - Events
- WML - Server Scripts
- WML - Submit Data
- WML - Inputs
- WML - Tasks
- WML - Links
- WML - Tables
- WML - Images
- WML - Fonts
- WML - Formatting
- WML - Variables
- WML - Comments
- WML - Elements
- WML - Syntax
- WML - Environment
- WML - Overview
- WML - Home
WML References
WML Tools
WML Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
WML - Links
WML provides you an option to pnk various cards using pnks and then navigate through different cards.
There are two WML elements, <anchor> and <a>, which can be used to create WML pnks.
WML <anchor> Element:
The <anchor>...</anchor> tag pair is used to create an anchor pnk. It is used together with other WML elements called <go/>, <refresh> or <prev/>. These elements are called task elements and tell WAP browsers what to do when a user selects the anchor pnk
You can enclose Text or image along with a task tag inside <anchor>...</anchor> tag pair.
The <anchor> element supports the following attributes:
Attribute | Value | Description |
---|---|---|
title | cdata | Defines a text identifying the pnk |
xml:lang | language_code | Sets the language used in the element |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
Following is the example showing usage of <anchor> element.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="Anchor Element"> <p> <anchor> <go href="nextpage.wml"/> </anchor> </p> <p> <anchor> <prev/> </anchor> </p> </card> </wml>
This will produce the following result:
WML <a> Element:
The <a>...</a> tag pair can also be used to create an anchor pnk and always a preferred way of creating pnks.
You can enclose Text or image inside <a>...</a> tags.
The <a> element supports the following attributes:
Attribute | Value | Description |
---|---|---|
href | URL | Defines URL of the pked page |
title | cdata | Defines a text identifying the pnk |
xml:lang | language_code | Sets the language used in the element |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
Following is the example showing usage of <a> element.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="A Element"> <p> Link to Next Page: <a href="nextpage.wml">Next Page</a> </p> </card> </wml>
This will produce the following result: