Definition and Usage. The src property sets or returns the value of the src attribute of an image. The required src attribute specifies the URL of an image. The backgroundImage property sets or returns the background image of an element. Tip: In addition to the backgroundImage = "url('URL')|none|initial| inherit". Chapter Summary. Use the HTML element to define an image. Use the HTML src attribute to define the URL of the image. Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed. Use the HTML width and height attributes to define the size of the image. A floating image - Using an image as a link - An image height and width.