A family of Microsoft word processing software products for creating web, email, and print documents.
Word's ability to open HTML files is a left-over from Word 95. At that time, the idea was to make a document in Word, save it as HTML, upload the HTML files to a web server, where another Word user could use Word to download the HTML and reconstruct the Word document. Along the way there was a Word add-in that turned Word into a sort of WYSWIG HTML editor, but that add-in is no longer supported or distributed by Microsoft.
A lot has changed since 1995. HTML is no longer version 3. The default file format for Word is no longer the proprietary Word (.doc) file format and has been replaced with a standards-based Office Open XML file format (.docx and its contemporary variants). The idea of making web pages in Microsoft Word never really took off - HTML code snobs really hated machine generated HTML code because it was not easily human readable.
I recommend that you abandon the old HTML file format and stick with the standards-based open file formats. If you want to get into the HTML and XML code, all you have to do is change (.docx) file extension to (.zip) in Finder and then double-click the (.zip) file to get at the code.
I can't help but wonder why anyone would save in the old HTML format any more. Did web pages even have headers and footers back then?