All of the elements you've learned about so far (headings, paragraphs, lists, and links) all share one thing in common: they're composed entirely of text! What if you want to add content to your web page that isn't composed of text, like images?
<img> element lets you add images to a web page. This element is special because it does not have a closing tag, it only has an opening tag. This is because the
<img> element is a self-closing element.
<img src="https://www.example.com/picture.jpg" />
Note that the
<img> element has a required attribute called
src, which is similar to the
href attribute in links. In this case, the value of
src must be the URL of the image. Also note that the end of the
<img> element has a forward slash
/. This is required for a self-closing element.