An HTML file is a text file containing markup tags that tell a web browser how to display the content. It must have an .htm or .html file extension and can be created with a basic text editor or HTML editor. HTML elements are made up of opening and closing tags that surround element content. Common tags include <html> for the document, <head> for page metadata, <body> for visible content, and <b> for bold text. Tag attributes provide additional information about elements.