HTML Image Links
What is Image Links HTML?
HTML <img> tag is specifically designed to incorporate images into web pages.
Key attributes of the <img> tag:
src: Specifies the URL or path to the image file.
alt: Provides an alternative text description for the image, which is important for accessibility and search engine optimization (SEO)
width: Sets the width of the image in pixels.
height: Sets the height of the image in pixels.
Image links Syntax:
This syntax it show how you can implement in your website:
<img src="url" alt="alternatetext">
Image links Example:
I updated the alt text to be more descriptive of the image content.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML Image Example</title>
</head>
<body>
<img src="https://learnfasta.com/assets/img/home-page-slide/no5.png" alt="Tanzania Programmers Logo">
</body>
</html>