I'm not sure what you're trying to do here, but I'm going to assume the HTML is loaded externally to the device.
If this is the case, you can get the user agent string and set the link appropriately using javascript (or server-side, as very much well said by Hivebrain).
The user agent string for an iPad might look something like this:
Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10
The iPhone one might look like this:
HTTP_USER_AGENT=Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1C25 Safari/419.3
You can get the user agent string using navigator.userAgent
. Having this, should be easy to write a simple if condition that check's the user agent and sets the link accordingly.
On the other hand, if the HTML isn't loaded externally to the device, I personally see no point on putting the condition right on the HTML.
Some references:
http://www.htmlgoodies.com/beyond/webmaster/toolbox/article.php/3888106/How-Can-I-Detect-the-iPhone--iPads-User-Agent.htm
What is the iPad user agent?
http://www.w3schools.com/jsref/prop_nav_useragent.asp