In the newest editions of MLA, the first step is to cite the source (book, chapter in a book, journal article, web page, government report, etc.), independently of whether you find it in print or online. To cite the source, you will include as many of the following "core elements" as possible. You may not find all of them.
Sometimes your source is located inside of another source, which MLA calls the "container." For example, a chapter in a book, an article in a journal, a poem in an anthology, a webpage on a website, etc. Once you have cited the source itself, you will then include information about its container. And other times, a source will be located in a container, which is located inside of a second container! For example, an article in a journal, in an electronic database. In this case you will first cite the source, then the first container, then the second container.
Each entry in the list of works cited is composed of facts common to most works—the MLA core elements. They are assembled in a specific order: author, title of source, title of container, other contributors, version, number, publisher, publication date, and publication location. If you are missing any of the core elements, simply leave them off.
The concept of containers is crucial to MLA style. When the source being documented forms part of a larger whole, the larger whole can be thought of as a container that holds the source. For example, a short story may be contained in an anthology. The short story is the source, and the anthology is the container.
The 9th edition of the MLA Handbook (2021) is not a major revision. Rather, it clarifies certain points of the 8th edition, and expands the number and types of examples.
The 8th edition of the MLA Handbook (2016) was a MAJOR revision that completely updated how citations are formatted.