How to Embed a PNG in HTML

104 32
    • 1). Paste the following into the HTML code where you want the image to appear on your site:

      <img src="URL">

    • 2). Right-click the PNG online and select "Copy Image Address" (or similar).

    • 3). Paste the image address in place of "URL." It should end in .png. For example, using a photo located at "http://www.mywebsite.com/myphoto.png," the code reads: <img src="http://www.mywebsite.com/myphoto.png">

    • 4). Adjust the width and height by adding and before the closing bracket. Change the values (X) to the size you want (in pixels). Using the preceding example and the size 300 pixels x 200 pixels, the code reads:

      <img src="http://www.mywebsite.com/myphoto.png">

    • 5). Add a border by typing in border="1px black solid" before the closing bracket. You can change the size, color, or style (solid, dashed, dotted). The code reads:

      <img src="http://www.mywebsite.com/myphoto.png" border="1px black solid">

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.