SitePoint Sponsor

User Tag List

Results 1 to 16 of 16

Thread: .htm or .html?

  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    .htm or .html?

    I've always wondered about this... is it better to make an HTML file .htm or .html?
    Quote(s) of the [insert random period of time here]:
    War does not determine who is right,
    it only determines who is left.

    ________-Unknown[Last updated April 12, 2006]

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,255
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)

    htm or html

    AFAIK the "htm" extension is from the time when filenames were limited to only 8 characters (joliet name) and file extensions were limited to only 3 characters. Things have changed a lot since then and there should be no problem with using "html" for current machines.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2006
    Posts
    190
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    html because its easier and simpler
    Failure: Failure is the dress rehearsal for success.

    Statistics: The only science that enables different
    experts using the same figures to draw different conclusions.

  4. #4
    SitePoint Addict SRTech's Avatar
    Join Date
    Mar 2005
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd go with .html as it makes more sense. I can't confirm it, but I think search engines prefer .html (though maybe only over .scriptinglanguage)

  5. #5
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by SRTech
    I can't confirm it, but I think search engines prefer .html (though maybe only over .scriptinglanguage)
    That's a common myth. Search engines give no prefernce to any file extension.

  6. #6
    CTO htmlguy's Avatar
    Join Date
    Feb 2005
    Location
    North Carolina
    Posts
    420
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea, you can use any file extension, and search engines will index you the same. The content is what matters . I actually use .shtml, when i am not using .php, I'm not sure why, but it works just as well.
    HTMLGuy

  7. #7
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zarel
    I've always wondered about this... is it better to make an HTML file .htm or .html?
    I think both are the same

  8. #8
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by htmlguy
    Yea, you can use any file extension, and search engines will index you the same. The content is what matters . I actually use .shtml, when i am not using .php, I'm not sure why, but it works just as well.
    HTMLGuy
    .htm or .html don't let you use server side includes. .shtml do

    To be honest though I'd probably just use a .php extension then as well though as if you later decide you need some php functionality in the page then you can quite easily slot it in without needing to worry about changing extensions and then changing all the links which link to that page.

    If you know it's going to be a static site then personally I'd just use .html but most of the time I know that I'll at least be using some .php functionality to drive navigation so most of my sites now use the .php extension.

  9. #9
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by csswiz
    .htm or .html don't let you use server side includes. .shtml do

    To be honest though I'd probably just use a .php extension then as well though as if you later decide you need some php functionality in the page then you can quite easily slot it in without needing to worry about changing extensions and then changing all the links which link to that page.
    But you're incurring PHP processing overhead on static content which is kinda wasteful.

  10. #10
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,340
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by vgarcia
    But you're incurring PHP processing overhead on static content which is kinda wasteful.
    that's true only if the server actually has php installed and listening
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  11. #11
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, naming it .php makes me unable to view them in my browser without uploading it to my server first. Plus, when I make something .html, it's usually to send to someone else, someone who might not have a server and/or PHP installed, so I can't just make it .php.
    Quote(s) of the [insert random period of time here]:
    War does not determine who is right,
    it only determines who is left.

    ________-Unknown[Last updated April 12, 2006]

  12. #12
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zarel
    Also, naming it .php makes me unable to view them in my browser without uploading it to my server first.
    You can if you install a WAMP package like XAMPP or Uniform Server.

  13. #13
    SitePoint Zealot
    Join Date
    Jul 2006
    Location
    Florida
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I usually just go ahead and use .php, but sometimes I'm on a comp without any server installed to it, and then that's just a pain. I just go ahead and use .html when that happens, since html is what the page is written in

  14. #14
    SitePoint Addict dAEk's Avatar
    Join Date
    Oct 2003
    Location
    Stockholm, Sweden
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesn't matter what extension you use.

    For instance, I can serve my jsp pages with a .dll, .php, .asp, .html or .whateverIwant extension. It's up to the server to send the appropiate mime type. The client doesn't (and shouldn't) care about the file extension!

    If you run html-files on the local computer instead of through a web server, then of course it's different.
    David Shamloo-Ekblad

    Go Habs! | For music addicts: Last.fm, SongMeanings

  15. #15
    SitePoint Enthusiast
    Join Date
    Mar 2005
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It' doesn't really matter what extension you put.

    I'm starting to really like the idea of no extension at all. It makes for a better looking URL ex. http://mysite.com/contact
    Hexagone3 Internet - Marketing - Advertising
    En affaires CoachingMusique
    Domiciliation

  16. #16
    SitePoint Enthusiast stilltsie's Avatar
    Join Date
    Sep 2006
    Location
    Orlando, FL
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by csswiz
    .htm or .html don't let you use server side includes. .shtml do
    Hmm I dont think that is true. My site utilizes SSI and all pages are *.htm

    My include file is *.shtml


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
  •