This page is a work in progress.You can help improve it. →

Empty elements

Not all elements follow the above pattern of opening tag, content, and then closing tag. Some elements consist only of a single tag, which is usually used to insert/embed something in the document at the place it is included. For example, the <img> element embeds an image file onto a page in the position it is included in:

<img
src="https://raw.githubusercontent.com/mdn/beginner-html-site/gh-pages/images/firefox-icon.png"
/>

This would output the following on your page:


© 2017 - 2022; Built with ♥ in St. Petersburg, Florida.