<!DOCTYPE html>
<html>
<body>
<h1>JavaScript String Methods</h1>
<h2>The link() Method</h2>
<p id="demo1"></p>
<p>The link() method is deprecated in JavaScript.</p>
<p>Use an a tag instead:</p>
<p id="demo2"></p>
<script>
let text = "Free Web Building Tutorials!";
let result = text.link("https://www.w3schools.com");
document.getElementById("demo1").innerHTML = result;
result = "<a href='https://www.w3schools.com'>" + text + "</a>";
document.getElementById("demo2").innerHTML = result;
</script>
</body>
</html>