Use a new, empty folder or directory. Name the starting or home text file index.html (or index.htm). All other text files should end in .html (or .htm). Pictures should end in .gif or .jpeg (.jpg).
Most top-ranking websites fail HTML validation. Google explains why perfect code isn’t required, and what matters instead. Many top websites have invalid homepage HTML, yet still rank well.