The bgcolor attribute is used for coloring the background of the document while background attribute specifies a background image for a document.