In works-cited-list entries, why is there sometimes a period before the edition number and sometimes a comma?

According to the MLA format template, periods appear in a works-cited-list entry after the author, after the title, and at the end of each container string. Elements within a container string—Title of Container, Contributors, Version, Number, Publisher, Publication Date, and Location—are separated by commas. An edition number is listed in the Version element. Punctuation before the Version element varies depending on whether another element precedes it. 

Let’s look at two examples.

In the following example, the entry begins with the title of a Web page followed by a period. The Web page is part of a larger work, or container, The Chicago Manual of Style. The title of the container, The Chicago Manual of Style, is followed by a comma and the version, “17th ed.”:

“The Author-Date System—Overview.” The Chicago Manual of Style, 17th ed., sec. 15.5, U of Chicago P, 2017, www.chicagomanualofstyle.org/book/ed17/part3/ch15/psec005.html.

In contrast, the entry in the example below begins with the title of a book, followed by a period. The book is not part of a larger work, so there is no container title to list. Instead, the container string begins with the Version element, “8th ed.”:

MLA Handbook. 8th ed., Modern Language Association of America, 2016.