HTML Image <img> tag is used to display images on web pages.
Syntax :
<img src="" border="" width="" height="" />
HTML Image <img> tag attribute
- src : It specifies the path (URL) to the image. The location of image may be on the same directory or another server.
- border : It specifies border of image.
- width : It specifies the width of an image. You Can also apply CSS in place of width attribute.
- height : It specifies the height of an image. You Can also apply CSS in place of height attribute.
- alt : It defines an alternate text for the image. The alt attribute is used for SEO purpose.
- align : It specifies left, right, top, bottom, middle alignment.
- style : You can apply style property to image like font, border, color, background, text alignment, margin, padding etc using style attribute.
- class : You can define class name to apply style on image.
Comments