SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 26

Thread: .html Vs .htm

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    .html Vs .htm

    Pls, how can i make my web pages to display on browsers as .html?
    Presently, my web pages are being displayed as .htm, instead of the normal .html
    For example, www.xxxx.com/index.htm
    Secondly, what is the difference between the two?

  2. #2
    SitePoint Wizard silver trophy Crazybanana's Avatar
    Join Date
    Mar 2003
    Location
    In tha fruit cellar
    Posts
    1,379
    Mentioned
    32 Post(s)
    Tagged
    1 Thread(s)
    well, you could start by saving it as .html and not .htm

    no other difference than the spelling and the fact that .htm is from some early systems which limited the file extension to three letters
    Who's to doom when the judge himself is dragged before the bar


  3. #3
    SitePoint Zealot mcdanielnc89's Avatar
    Join Date
    Feb 2008
    Location
    Missouri
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Practically speaking, there is no difference between the two extensions. Both denote that the file contains HTML. This is really a matter of convention and is not an absolute, but most realize that a file whose extension is htm or html contains HTML.
    On most, if not all, servers either file will be sent with a MIME type of text/html by default. This can usually be changed by the server's administrator(s), but is, more often then not, left alone.
    On most, if not all, browsers, either file will be displayed as intended (i.e. rendered according to the browser's default manner of displaying HTML documents). This last is due more to the MIME type sent by the server then by the file's extension, but that's a matter for another FAQ.
    Generally, the use of htm over html, or vice versa, is left to the author's personal preferences.

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Unless you set the two to function differently on eht server there is no difference between them at all and so no reason to need to change anything.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    Guru in training bronze trophy SoulScratch's Avatar
    Join Date
    Apr 2006
    Location
    Maryland
    Posts
    1,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    None whatsoever, but I would advise that you do keep it consistent so if you go the .htm route keep it all htm, likewise for every other extension or even the omission of any extensions.
    Cross browser css bugs

    Dan Schulz you will be missed

  6. #6
    SitePoint Author Kevin Yank's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne, Australia
    Posts
    2,571
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you are creating the files on a Windows computer, you might not be able to see the filename extensions, which can make it difficult to change them.

    In Control Panel, find and open Folder Options. On the View tab, look for "Hide extensions for known file types" in the list of advanced settings, and make sure it’s turned off. Once that’s done, you will be able to see the full file names of your files and rename them from .htm to .html if you want to.
    Kevin Yank
    CTO, sitepoint.com
    I wrote: Simply JavaScript | BYO PHP/MySQL | Tech Times | Editize
    Baby’s got back—a hard back, that is: The Ultimate CSS Reference

  7. #7
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your contributions. I have resolved the problem, it is now changed to a .html.
    The reason why i wanted/desired to change it from .htm to .html is that some sites automatically request you to click on a link to validate your url link, before a required transaction is completed, but once you clicked on the link, it would be stacked.

    The browser would not be able to reach the landing page because the automated link was scripted with a default url link .html.

    An example is Google Analytic webpage, when validating your url.

  8. #8
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Correct me if I'm wrong, someone.

    .htm was introduced by Microsoft because old versions of Windows didn't like four-letter file extensions. Windows has long ago accepted .html so it's no longer an issue.

  9. #9
    SitePoint Enthusiast
    Join Date
    Jul 2009
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Max im pretty sure you are correct, I know at this point it is no difference

  10. #10
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Black Max View Post
    Correct me if I'm wrong, someone.

    .htm was introduced by Microsoft because old versions of Windows didn't like four-letter file extensions. Windows has long ago accepted .html so it's no longer an issue.
    From DOS to Windows 3.1, the FAT filesystem was limited in that regard. Windows 95 introduced VFAT which allowed long file names. Just FIY

    Microsoft didn't really introduce .htm themselves, just what others came up with to get around the limitation of FAT.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  11. #11
    SitePoint Zealot
    Join Date
    Jul 2009
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Although there is no difference, but with .html, constitute the majority.

  12. #12
    SitePoint Evangelist rhysboy84's Avatar
    Join Date
    May 2007
    Location
    Colwyn Bay, North Wales, UK
    Posts
    438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's no difference now (those of us over a certain age may remember times where "SEO Friendly" page names were displayed as "make-m~1.htm" in DOS/3.1), but to echo the advice above - choose one, and stick to it. Particularly if you switch between htm & html. Servers CAN have a say in which is chosen first out of index.html, index.htm & index.php, so to avoid staring blankly at code wondering why it's not updating, choose one and one only!
    I'm Rhys Wynne & I blog at Winwar Media
    WP Email Capture: Free Email/Ebook Marketing Wordpress Plugin
    UK Based SEO? Tweet Your Location to #ukseohere!
    | My Brand New Brand | Twitter |

  13. #13
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you need not worry about the convention here. .htm indicated that your website was done some years back when .htm extension was popularly used. I do not think there is any need to get rid of it if there is an otherwise reason.

    Joomla CMS Development

  14. #14
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ruskin012 View Post
    .htm indicated that your website was done some years back when .htm extension was popularly used.
    Not always, I use .htm out of habit

  15. #15
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no difference i just prefer .HTML -

  16. #16
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually there is no difference between two. You can use any one. Its your choice what you want to use. But .htm extension used few years back frequently and now maximum programmer use .html

  17. #17
    SitePoint Enthusiast boicu.org's Avatar
    Join Date
    Aug 2009
    Location
    Romania
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there is no difference between html and htm there are the same only 1st has 4 letters and 2nd only 3 .. I prefer htm because it`s shortly and when I save them it`s easy to type htm :P but you don`t have to worry about because the site will function same as html or htm

  18. #18
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    they'd only yield different results if your siteadmin has done something weird with .htaccess

  19. #19
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by thatbradguy View Post
    they'd only yield different results if your siteadmin has done something weird with .htaccess
    Or you set up your own htaccess file to make them work differently.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  20. #20
    SitePoint Enthusiast boicu.org's Avatar
    Join Date
    Aug 2009
    Location
    Romania
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there is no difference just the name index.htm it`s shorter then inted.html .. the file size it`s the same .. you don`t need to worry about the file size .. you must worry about how to optimize your files (images and css) to be smaller so when your site it`s loaded you`ll have to wait shoter

    a trick to make your images smaller it`s to use adobe photoshop and follow the steps
    1.open an image on photoshop
    2.resize it at the dimensions you need .. (not set the size from html code because the image will be as big as it`s in reality but with different look on your site)
    3.export the image for web by hit ctrl+alt+shift+S and select the resolution you want (lower 0&#37; - best 100%) I use 60% because it`s the same quality (a little bit lower but invisible)

    then css must be quite smaller and do not set fonts and styles from index .. jsut use css it will load really shorter then if you don`t use the stept I told you
    Maybe you knew that but I want to remind you that

    Good luck

  21. #21
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    I have my .htaccess file set so that .html files get parsed for PHP and .htm don't. That is one example of how you can use them differently by using the .htaccess file.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  22. #22
    SitePoint Enthusiast boicu.org's Avatar
    Join Date
    Aug 2009
    Location
    Romania
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think Soumali it`s a spammer ..

  23. #23
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by boicu.org View Post
    I think Soumali it`s a spammer ..
    That's why I reported those posts as spam and why one of the moderators has deleted those posts (and presumably banned them from the forum).

    You can use the small red triangle at the bottom left of posts to report them to the moderators (otherwise known as advisors and team leaders).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  24. #24
    SitePoint Enthusiast boicu.org's Avatar
    Join Date
    Aug 2009
    Location
    Romania
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up

    Quote Originally Posted by felgall View Post
    That's why I reported those posts as spam and why one of the moderators has deleted those posts (and presumably banned them from the forum).

    You can use the small red triangle at the bottom left of posts to report them to the moderators (otherwise known as advisors and team leaders).
    thanks felgall I didn`t knew that

  25. #25
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can anyone explain to me the difference between html and htm.thanks in advance


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •