Images

The web would be a lot less fun without images such as photos and animated gifs:

<img src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png" alt="Google Logo">
Google Logo
<img src="https://www.google.com/logos/doodles/2015/googles-new-logo-5078286822539264.3-hp2x.gif" alt="Animated Google Logo">
Animated Google Logo
  • The src attribute is required.
  • A closing tag is not required, because an image tag cannot contain any content.
  • Other attributes are optional but often helpful:
    • alt provides alternate descriptive text
    • width and height will modify the image size