What punctuation mark introduces a GIF extension block?

The story behind the answer

An exclamation point introduces a GIF extension block.

In the GIF file format, the byte value 0x21—the ASCII exclamation point, “!”—marks the beginning of an extension block. The next byte identifies the extension type, such as the Graphic Control Extension used for animation timing, disposal methods, and transparency settings. Extension data then follows in sub-blocks and ends with a zero-length sub-block.

This marker is part of GIF’s stream-oriented structure. A decoder can read the file one segment at a time, recognizing an image by 0x2C, an extension by 0x21, and the terminating trailer by 0x3B. Because extensions were designed to expand the original GIF87a structure, a decoder that does not understand a particular extension can often skip it and continue processing the rest of the file.

The most familiar use is animated GIF timing. A Graphic Control Extension normally appears immediately before the image it controls and can specify a delay in hundredths of a second. The punctuation choices are easy to mix up: a comma introduces an Image Descriptor, a semicolon marks the trailer, and the exclamation point signals an extension.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: