Page 76 - DCAP512_WAP_AND_WML
P. 76

WAP & WML




                    Notes
                                          Example: Following is the example showing usage of this element:
                                   <?xml version="1.0"?>

                                   <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
                                   "http://www.wapforum.org/DTD/wml12.dtd">
                                   <wml>
                                   <card id="one" title="First Card">

                                   <p>
                                   This is the first card in the deck
                                   </p>
                                   </card>

                                   <card id="two" title="Second Card">
                                   <p>
                                   This is the second card in the deck
                                   </p>

                                   </card>
                                   </wml>

                                   6.2 Using URLs

                                   Links may be given in two ways, but the <a> tag is preferred.

                                   <anchor>Go to URL<go href=”url.wml”/></anchor>
                                   <anchor>Go to URL<go href=”http://wml.org.de/url.wml”/></anchor>
                                   <a accesskey=”1" href=”#card”>Go to card</a>
                                   <a href=”http://wml.org/deck.wml/#card”>Go to card</a>
                                   href: Target; either a deck or a card; a card is prefixed by #, the target can either be given relative
                                   or absolute. If no card is given, the first card of a deck is linked. This address is called URL
                                   (Uniform Resource Locator).
                                   Self Assessment


                                   Fill in the blanks:
                                   1.  The element is the simplest way in WML of creating an …………………….. that links one
                                       document to another.

                                   2.  The …………………….. element encloses a WML card within a deck.
                                   3.  The …………………….. element  is used  to specify a navigation  action that  occurs as a
                                       result of an event.

                                   4.  …………………….. is used to specify the destination of a hyperlink.






          70                                LOVELY PROFESSIONAL UNIVERSITY
   71   72   73   74   75   76   77   78   79   80   81