ppt1
ppt1
<h3>src Attribute</h3>
source
width and height Attributes <img src="C:\Users\DELL\Desktop\flower.jpg" width="50"
height="65">
The <img> tag should also contain the width and
height attributes, which specify the width and height </body>
of the image (in pixels). </html>
Diff between src and href
Src Href
Purpose: The src (source) attribute specifies the Purpose: The href (hypertext reference)
path to the image file that should be displayed attribute specifies the URL to which the link
in the web page. points. It defines where the browser will
Usage: It directly loads the image and displays it navigate when the link is clicked.
on the page. Usage: It creates a hyperlink, allowing users to
Example: click and go to another webpage or resource.
<img src="image.jpg" alt="Description of Example:
image"> <a href="https://www.example.com">Visit
Example</a>