0% found this document useful (0 votes)
3 views

ppt1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

ppt1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 2

src Attribute

The <img> tag is used to embed an image in an Example:


HTML page.
<!DOCTYPE html>
The src attribute specifies the path to the image <html>
to be displayed <body>

<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>

You might also like