The Tri-College Libraries recommend Zotero, a free online app that can format your bibliography, keep your citations organized, and even save your articles in the cloud so you can access them later from the library, home, or a café.
This 2017 edition of the handbook provides guidance on documenting sources and on writing style. It is frequently recommended for use by students in history. It includes instructions and examples for online publications and websites.
This page explains the system using separate bibliographic notes for citations rather than including them in the text as in often done in science papers. Examples are included for the different kinds of publications most often used by history students.