The following step illustrates how to add an image to a Web page by entering an <img> tag in the HTML file using the tags.
Image attributes and functions
alt
- Alternative text to display when an image is being loaded
- Especially useful for screen readers, which translate information on a computer screen into audio output
- Should be a brief representation of the purpose of the image
- Generally should stick to 50 characters or fewer
height
- Defi nes the height of the image, measured in pixels
- Improves loading time
hspace
- Defi nes the horizontal space that separates the image from the text
src
- Defi nes the URL of the image to be loaded
vspace
- Defi nes the vertical space that separates the image from the text width
- Defi nes the width of the image, measured in pixels
- Improves loading time
Example :-
<img src=”image.jpg” width=”400” height=”200” alt=”my image” />
No comments:
Post a Comment