18.4. XHTML MP Image Links
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:
<?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>
<?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:
|
|
If you select the image, the WAP browser will display the XHTML MP file linksEg5.xhtml.
|
|
Previous Page | Page 26 of 36 | Next Page |
- 1. XHTML MP (XHTML Mobile Profile) Introduction
- 2. Development of Wireless Markup Languages
- 3. Advantages of XHTML MP
- 4. WML Features Lost in XHTML MP
- 5. Syntax Rules of XHTML MP
- 6. XHTML MP MIME Types and File Extension
- 7. XHTML MP Document Structure
- 8. XHTML MP Generic Metadata
- 9. Comments in XHTML MP
- 10. Line Breaking in XHTML MP
- 11. XHTML MP Horizontal Rules
- 12. XHTML MP Headings
- 13. Font Style in XHTML MP
- 14. XHTML MP Preformatted Text
- 15. XHTML MP Lists
- 16. XHTML MP Images
- 17. XHTML MP Tables
- 18. Anchor Links in XHTML MP
- 19. XHTML MP Selection Lists
- 20. XHTML MP Input Elements
- 21. Submitting Form Data to the Server in XHTML MP