How to Add Pictures Into HTML

Save

Pictures provide interest to a Web page. They are also useful for breaking up text. A picture is not stored directly on the Web page. Instead, it is stored in a directory on your Web server. You can also place images that are stored on another Web server on your Web page. The HTML tag "img" is used to tell the browser where to find the picture that you want on your page. The "alt" attribute is used to describe the picture. The "width" and "height" attributes are used to format the picture to fit on your page.

  • Upload the pictures that you want to add to the Web page to your Web server or locate the Web addresses (URL) for the pictures.

  • Open the HTML document that you want to add the picture to in any text editor, such as Windows Notepad.

  • Place your cursor at the location in the HTML document where you want to add a picture.

  • Type the line "<img src="address.jpg" alt="description_text" width="300" height="300"/> to add the picture. Replace "address.jpg" with the URL for the picture. If the picture is stored on your Web server ,the URL will be similar to "images/picture.jpg." If the picture is stored on another website, the URL will be similar to "http://website.com/images/picture.jpg." The "alt" attribute is used to describe the picture if it does not load for any reason. The "width" attribute describes the width of the image in pixels. The "height" attribute describes the height of the image in pixels.

  • Save and close the text document.

  • Open the HTML file in any Web browser to view the picture.

References

Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!