Which one is good for file page extension .html and .php

Discussion in 'HTML & Website Design' started by syedatifyousuf, Nov 28, 2011.

  1. #1
    Which one is good for file page extension
    .html and .php
     
    syedatifyousuf, Nov 28, 2011 IP
  2. xira

    xira Active Member

    Messages:
    315
    Likes Received:
    8
    Best Answers:
    4
    Trophy Points:
    68
    #2
    Both are wonderful... it depends what code you're using.
    If you're using ONLY html, then the extension should be .html
    If you have PHP in your page, you should use .php
     
    xira, Nov 28, 2011 IP
  3. 7thand43rd

    7thand43rd Member

    Messages:
    84
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    It's not really which one is 'good', as opposed to what are you trying to do? PHP will only render itself when the file type is '.php', unless you do some .htaccess work. '.php' file type handles both HTML and PHP (and Javascript, etc.), while the HTML will display any PHP code as just regular text and will not render it, making the PHP functions worthless.

    But I use '.php' file type regardless of whether its pure HTML or not, just in case I have to go back and add some PHP later on, don't want any unneeded hassles.
     
    7thand43rd, Nov 28, 2011 IP
  4. Black4c3

    Black4c3 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    html is good...

    but if your code include php tag.. you must use .php as your extention
     
    Black4c3, Nov 29, 2011 IP
  5. shanmugappriya

    shanmugappriya Peon

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you for the sensible critique. It,s is very useful to me.
     
    shanmugappriya, Nov 29, 2011 IP
  6. vencin

    vencin Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    can anybody please tell guide me in becoming a web designer. i want to work full time for this profession need help of you people.
     
    vencin, Nov 29, 2011 IP
  7. BrownCat

    BrownCat Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    You can't select .html or .php extensions of your choice. It all depends on your page contents. If there is PHP code involved in your page than you will have to use .PHP extension and you can't use .HTML even if you want to. Because if you select .HTML extension for the page having PHP code in it, than your PHP code will not be executed. Selecting PHP extension you can run both PHP and HTML codes.
    PHP code will need a webserver to run and a PHP page can have both HTML and PHP codes at the same time.
     
    BrownCat, Nov 30, 2011 IP
  8. jashlok

    jashlok Peon

    Messages:
    125
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Both extension have different meaning. If ur use html extension then ur site is simple not dynamic means not data base connectivity. And if u want to made dynamic site then u use php extension.
    As per seo point for promotion html website is gud rather than php dynamic sites.
     
    jashlok, Nov 30, 2011 IP
  9. Alan Smith

    Alan Smith Active Member

    Messages:
    1,263
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    78
    #9
    Both are good as per requirement, but if you think about SEO then .html will work better than .php
     
    Alan Smith, Dec 1, 2011 IP
  10. reo69

    reo69 Peon

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #10
    Unless you're thinking of putting PHP code into your site, stick with .html. However, if you want the dynamism that PHP offers and want to add PHP code to your site, .php is a must.
     
    reo69, Dec 1, 2011 IP