Why isn't my formatting being saved in html

When I save my document in html, the formatting is not being saved. The document looks fine in writer, but html seemed to lose carriage returns and tabs. I thought I had done this before, but now I can’t seem to get it to work.officernames2020.html I got a message about file types when I tried to add the html, but it appears to have added it.

What you supplied with the display-name “officernames2020.html” actually is an .odt file.and has odt content.
Opened with LibreOffice Writer it shows a (sorry) gauche attempt to create something looking like a table using tabs, and paragraph breaks.

To export a table to html it must actually be a table, not only something looking similar.
Serious advice: Never switch off Formatting Aids!

What you had in mind might look like officerNames.odt in Writer
and like officerNames.html.fake.odt in a web browser.
To get the permission to upload the second file, I needed to append a .odt to its name. You need to replace the .odt with .html again, to get it associated to your web browser.

===Edit about 2 h after the post===
Related to the first comment below:
Creating documents for publishing them as .html is mainly supported by LibreOffice Writer. However, also in Writer something being expected to show as a table later must be created as a table, or converted from tab-separated lines (one tab per column!) to a TextTable in advance the storing or export. Ordinary text formatted the ordinary way can be written together with tables, images, shapes… to .html then in one go, and will be contained in the target file including the formats as far as they can be mapped to the file format. .

Thank you for your prompt response. I put the information into a spreadsheet and created an html file and it looks fine. Appreciate the help.

Just a bit of background…I am a seasoned citizen, older than dirt some say, trying to take a paper yearbook for our sorority and create a website. I worked on it and had it looking okay when we had changes due to Covid. I knew I was also going to need a paper copy for some of our members and was trying to create something that I wouldn’t have to maintain a paper version and an online version. To put this page into context, the website is bspagd.weebly.com. I was pleased the way it turned out. Self-taught with the help of people like yourself, from both LibreOffice and Weebly. I don’t always know the best method to use to accomplish the end product, but I’m still trying!

Glad that you got it done.
My additional remark was mainly addressing other users coming to this thread, and probably missing the fact that Writer is well equipped for the task. .