Basic HTML and HTML5: Add Images to Your Website
element, and point to a specific image’s URL using the
An example of this would be:
elements are self-closing.
elements must have an
attribute. The text inside an
attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.
Note: If the image is purely decorative, using an empty
attribute is a best practice.
attribute should not contain special characters unless needed.