I have a question regarding the HTML Elements and Structure which states that " […] HTML code is always saved in a file with an .html extension." Is a .htm extension no longer valid? Also I was given to understand that the file extension is only to help Windows to identify it, and that other software doesn’t care?
When you save the file locally, the difference doesn’t matter - your local system will likely treat the two file extensions as interchangeable for loading by your browser. The reason for it is that historically Windows-based systems used 3 letter extensions (
htm ) and Unix-based systems the 4 letters (
On a server-side, there may be some differences when it comes to serving default filenames
Hope this helps
Ah okay, thats interesting
if you have a server available, create a test folder, on the site root. Call it test.
Create two HTML documents with TITLE elements,
HTML, then upload each. Use the
.htm extension on one,
.html on the other.
Navigate to www.yoursite.com/test/. What appears in the titlebar? HTM or HTML. That will tell you which extension is the server default when
index.htm) is not included in the request URL.