The class attribute on an <img> tag assigns one or more classnames to the image. Classes are used to style elements. Classnames are defined in a stylesheet or in a local <style> element.
What is IMG attribute?
The <img> tag is used to embed an image in an HTML page. … The <img> tag creates a holding space for the referenced image. The <img> tag has two required attributes: src – Specifies the path to the image. alt – Specifies an alternate text for the image, if the image for some reason cannot be displayed.
What is the IMG tag used for?
The <IMG> tag is used to incorporate in-line graphics (typically icons or small graphics) into an HTML document. This element is NOT intended for embedding other HTML text.