Skip to main content
All CollectionsDownload/Copy files
How to embed PNG or SVG images in HTML?
How to embed PNG or SVG images in HTML?
Devie avatar
Written by Devie
Updated over 3 months ago

To embed PNG or SVG images in HTML, you can use the <img> tag with the src attribute. Here are the steps:

  1. Locate the PNG or SVG file on your computer.

  2. Upload the file to your website server or hosting service.

  3. In your HTML code, use the <img> tag with the src attribute to specify the file location.

For a PNG image:

Replace "image.png" with the name and path of your PNG image file. The "alt" attribute provides a description of the image for users who cannot see the image.

For an SVG image:

Replace "image.svg" with the name and path of your SVG image file. The "viewBox" attribute specifies the dimensions of the SVG image, and the <use> tag is used to reference the SVG file. Replace "svg" in "#svg" with the ID of the SVG element you want to use.

Note: SVG images can also be embedded using the <img> tag, but using the <use> tag provides better accessibility and flexibility.


If you're looking for a vast library of ready-to-use SVG or PNG icons and illustrations, Streamline offer a wide selection that can be easily embedded in your projects. With customizable assets, you can simplify your design workflow, ensuring high-quality visuals that fit seamlessly into your HTML.

Did this answer your question?