The Common Gateway Interface, or CGI, is a standard for communication between Web documents and CGI scripts you write. CGI scripting, or programming, is the act of creating a program that adheres to this standard of communication. A CGI script is simply a program that in some way communicates with your Web documents.
Web documents are any kind of file used on the Web.
They can be HTML documents, text files, image files, or any number of other file formats. The existence of this gateway between programs you write and your Web documents allows you to create much more dynamic and interactive Web pages than you could with HTML alone. This chapter will help you understand the role of CGI scripting within the World Wide Web and will show why you would want to use it. Then you will learn some of the advantages of CGI scripts. Many people have heard of the World Wide Web, but not everyone knows what it is.