To add HTML Links

She is a Dreamer, she is a believer, she is a doer, she is an achiever, and that she is “You”. Happy Women’s Day.
What is link in HTML?
What is link in HTML?A link has two ends — called anchors — and a direction. The link starts at the “source” anchor and points to the “destination” anchor, which may be any Web resource
hello friends !! In todays article we will see 1) Link in html 2)To use image as link 3)Button on link 4)Link in colour 5)Link to an E-mail address
1) Link in html
Link in HTML
<!DOCTYPE html>
<html>
<body>
<h2>links in html</h2>
<p><a href="https://knowledge-junction.in/2022/01/11/introduction-of-html/">About HTML</a></p>
</body>
</html>

2)To use image as link
<!DOCTYPE html>
<html>
<body>
<h2>Image as a Link</h2>
<p>The image below is a link click on it.</p>
<a href="https://knowledge-junction.in/2022/01/11/introduction-of-html/"><img src="C:\Users\I-net computer\Downloads\images.jfif" alt="HTML " style="width:42px;height:42px;"></a>
</body>
</html>

3)Button on link
<!DOCTYPE html>
<html>
<body>
<h2>Image as a Link</h2>
<button onclick="document.location=' C:\Users\I-net computer\Downloads\images.jfif'">HTML </button>
</body>
</html>

4)Link in colour
<!DOCTYPE html>
<html>
<head>
<style>
a:link, a:visited {
background-color: #f44336;
color: white;
padding: 15px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
}
</style>
</head>
<body>
<h2>HTML</h2>
<a href="https://knowledge-junction.in/2022/01/11/introduction-of-html/ " target="_blank">This is a link</a>
</body>
</html>

5)Link to an E-mail address
<!DOCTYPE html>
<html>
<body>
<h2>Link to an Email Address</h2>
<p><a href="mailto:someone@example.com">Send email</a></p>
</body>
</html>

Thankyou friends 🙂 #HAPPYCODING #STAYHEALTHY #HAVEFUN #WORKSMART and yes kindly any doubt #docomment
You must log in to post a comment.