Q: Jquery add hyperlink to a string value I am writing this code in jquery . var name= " this is a sample text and click here to visit google.com " . Now I want to add a hyperlink to the word " click here " only. eg of the link has to be google.com. and the variable name will be displayed on the front end . 

A: You don't need jQuery for a simple hyperlink. Just use the <a> tag from HTML.
<a href="www.google.com">This is a sample text and click here to visit google.com </a>

