Web Page Extensions – Explained By Semalt Expert

First of all, let's define what a file type is. It's a certain specification (one of many) that describes the actual structure of a file. According to this structure, the file is stored, processed by programs and displayed. The visible part of file type for a user is file extension.

The file extension is a specific sequence of characters (letters and digits), following the filename after the dot symbol "." and used to identify a type of file by programs and user. Seeing file's extension, the person or program understands what type of data is stored in a particular file, what features it has, what's necessary to run it.

It's worth noting that file extensions usually mean characteristic of a certain file, not file's belonging to any group. For example, not all images have the same extension.

.html and .htm

HTML is a standard hypertext markup language of documents that form web pages. Files written in html usually have a self-titled extension.

.htm is a file extension sometimes used for html files.

The difference between .html and .htm is only in one missing letter in a file extension. Earlier it was dictated by the need to limit the number of letters in file extension: old OS could read only three symbols. Today there is no real difference.


A file with .php extension is a text file with a code of script language PHP (Personal Home Page Tools). PHP language is widely used to develop web applications and web pages. Based on php-files the web server creates dynamic web pages. So, php-file is a program written with PHP and .php is its extension.

Web images

A wide popularity for web graphics received two formats with extensions of the same name - GIF and JPEG. Their multifunctionality, versatility, small amount of source files with sufficient quality for a web page is what made them a standard for web images. There is also PNG format which is also supported by browsers when adding images. However, the popularity of PNG is much inferior to GIF and JPEG formats.

GIF (Graphics Interchange Format) is a format of graphic files widely used when creating sites and posting on web pages. GIF uses 8-bit color and effectively compresses entire color areas while keeping the details of an image. GIF supports a frame-by-frame change of images which makes this format popular for creating banners and simple animations.

JPEG (Joint Photographic Experts Group) is another popular format for web images. JPEG supports 24-bit color and keeps brightness and shades of colors in photos unchanged. This format is used mostly for photos. JPEG format can have .jpeg and .jpg extensions – same as with .html and .htm, all the difference is in one missing letter.

PNG (Portable Network Graphics) is similar to GIF. According to the developers, PNG uses an improved format for data compression.

So, to conclude, in most cases .gif files are animations and images requiring strong compression and small size, .jpg and .jpeg are photos and .png files are all the rest.