In the new version 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.