1. Images Syntax & the alt attribute
  • <img> contains attributes only, and doesn't have a closing tag.

  • The alt attribute provides an alternate text for an image, if the user cannot view it. The value of <alt> should describe the image.

    <img alt="Flowers" src="img_chania.jpg" >

    Q) Can alt be defined as class?

    • alt attribute is different with the class altribute.the alt attribute is just for describing the image and it is necessary to add it in the tag.