You can't do that with HTML. Maybe with Javascript. Basically, you just detect double clicks in a certain area and then select the appropriate text.
EDIT:
Here's how to do it in W3C compliant browser (e.g. Firefox, it probably won't work in IE, which isn't a W3C compliant browser and uses different text selection model):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript">
function select(elem) {
var sel = window.getSelection();
var range = sel.getRangeAt(0);
range.selectNode(elem);
sel.addRange(range);
}
</script>
</head>
<body>
<p>a simple paragraph, this is
<span onclick="select(this);">clickable area</span>
when this
<span ondblclick="select(this);">span tag is double-clicked</span>
then they will be selected
</p>
</body>
</html>
Lie Ryan
2010-06-20 09:21:57