XHTML MP Image Links

Preferences - Do not show ads

An anchor link can be attached to an image in XHTML MP. Just place an <img> tag within the <a></a> tag pair. This XHTML MP example shows how to do this:


(linksEg4.xhtml)

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>XHTML MP Tutorial</title>
  </head>

  <body>
    <p>
      This is page 1.<br/>
      <a href="linksEg5.xhtml"><img src="to2.gif" alt="Go to linksEg5.xhtml"/></a>
    </p>
  </body>
</html>


(linksEg5.xhtml)

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>XHTML MP Tutorial</title>
  </head>

  <body>
    <p>
      This is page 2.<br/>
      <a href="linksEg4.xhtml"><img src="to1.gif" alt="Go to linksEg4.xhtml"/></a>
    </p>
  </body>
</html>


These are the screenshots of the linksEg4.xhtml page in WAP browsers:


Sony Ericsson T610


Nokia Mobile Browser 4.0


If you select the image, the WAP browser will display the XHTML MP file linksEg5.xhtml.


Sony Ericsson T610


Nokia Mobile Browser 4.0


Previous Page Page 26 of 36 Next Page

Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?






XHTML MP Tutorial Table of Contents XHTML MP Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page