If HTML the document contains independent blocks of tags (not having other parents, except BODY) it can be divided into…