I am writing an introductory HTML course. I remember discovering 9 years ago as I was learning HTML that both and worked
Indeed. Modern browsers will display code that is not valid in order to make sure that old websites still display correctly and slightly-invalid code doesn't screw up a page.
For example, forgetting to close a I'm not aware of a well-used, up-to-date browser that will fail to display an before you open a new one - all modern browsers will simply assume you closed it.
tag, but will display an tag.