DISCOVER
×

How to insert a GIF file into HTML with Notepad

Updated July 20, 2017

GIF stands for Graphics Interchange Format and these type of image files are the most commonly used on websites along with JPEG files. As well as still pictures, the GIF format supports animation. Still or animated images can draw from a palette of 256 colours meaning they produce good definition in the context of a Web page. Notepad is a simple word processing programme that comes as standard on Windows computers and programmers often use it to create web pages with HTML code.

Select the GIF image you want to use from the "images" folder within the folder that holds all your website's elements. If the image is not already in that folder, you need to save it there.

Open Notepad and navigate to the HTML page where you want to add the image. Select the position where you want the GIF to appear and insert the following line of code: image description

Replace "xxx" with the file name of the image, including the GIF extension, and change the image dimensions to the correct ones for the relevant photo. Add a brief description of the image.

Save your Notepad file and upload it to your website with your FTP programme. Transfer the image file and check that the file has the extension ".gif" after you've uploaded it as sometimes the file extension can be inadvertently capitalised, meaning it won't appear on your web page.

Tip

Notepad files must be saved with the extension".html" files to make them work as web pages.

Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Ken Macdonald lives in London and has been a freelance editor and writer since 1999. He has written on topics including travel, food and gardening for UKTV, Expedia and “The Guardian” website. He holds a Bachelor of Arts in English studies from Stirling University in Scotland.