December 6, 200817 yr Which is the best PHP vs HTML? What is the difference between them both. I know the HTML works better on SEO than php (correct me if i am wrong).
December 6, 200817 yr I'm not sure I can choose...since you can use them together to create dynamic pages.... HTML makes up the basic content of the page, php enables the page to 'react' to events or conditions, and adapt the HTML accordingly. PHP is server side, HTML is browser side. You don't see the php unless you're doing it yourself...you can see the HTML. They do completely different jobs, but work together. For me it's like if you asked me whether I liked the chicken or the gravy best in my roast....they are best together for me.
December 6, 200817 yr The question doesn't make sense. If you were going to ask the question, it would be PHP vs ASP or something like that since both are programming languages and both serve the same purpose. You can use it to build the HTML page for example - outputting a table containing data from the database. HTML is the end result for the work done by PHP... if's elses etc..
December 6, 200817 yr I'm not sure I can choose...since you can use them together to create dynamic pages....HTML makes up the basic content of the page, php enables the page to 'react' to events or conditions, and adapt the HTML accordingly. PHP is server side, HTML is browser side. You don't see the php unless you're doing it yourself...you can see the HTML. They do completely different jobs, but work together. For me it's like if you asked me whether I liked the chicken or the gravy best in my roast....they are best together for me. I agree, you cant compare the two as to what is best, html and php work together, amongst other server side languages. Pat
December 6, 200817 yr WHAT. They are completely different things!! NEW VOTE! WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON?
December 6, 200817 yr I don't think you can really compare them seeing as they both do different things
December 6, 200817 yr WHAT. They are completely different things!! NEW VOTE! WHAT IS BETTER, PUBLIC TRANSIT OR THE MOON? The Moon it comes every night Pat
December 6, 200817 yr I think PHP is more dynamic but they work so well together especially XHTML and PHP. PHP makes HTML work even better
December 6, 200817 yr I use both together so i don;t think you can do a poll on which is best - it would be better to compare PHP with ASP! PHP would win of course.
December 6, 200817 yr I also agree with what the other members said, PHP and HTML complement each other.
December 7, 200817 yr Author Well sorry guys am just new to this. I've seen sources from websites save as PHP and one has HTML can't really see a spot a difference between them both.
December 7, 200817 yr Well sorry guys am just new to this. I've seen sources from websites save as PHP and one has HTML can't really see a spot a difference between them both. .php files have php code in the original source files that are on the server. When the server fetches a page with a .php extention, it knows that before it sends it accross the net to your browser it has to process the php code and 'construct' the HTML that is generated from it. Once it has processed the php code the resulting page that is sent out is pure HTML, and would work with a .html extention, but because the URL is of the origonal file it retains the .php. Think of PHP as a way to dynamically create html pages before you send it to people's browsers, so for example if I had a page that displayed todays date, I would have some PHP code that fetched the date and then inserted it as HTML. By the time the browser reads page (and you the source code) it knows no different, the only tell tale sign is the .php on the end of the URL. Hope that clears it up
December 7, 200817 yr php that produces xhtml content ps even if a page only has html content i still place it in a php file (should i ever want to add dynamic content the page location and name remain the same for the search engines )
December 7, 200817 yr Basically, PHP generates the content for a page, and this is drawn into html tags and css, which make it look like something more than just a page of text. PHP is backend (content-focussed: what you "read" on a website [assuming it's powered by php]), HTML is front end (visual, basically what you "see" on a website)
December 7, 200817 yr I use both together so i don;t think you can do a poll on which is best - it would be better to compare PHP with ASP! PHP would win of course. Agreed.
December 7, 200817 yr The Moon it comes every night Pat The bus comes every 30 minutes... Far superior.
December 10, 200817 yr Does the server only know that it needs to pre-process the file by the .php extension, or will it parse code embedded in a file that ends .html? In terms of user experience I think it's a little more comforting to see "index.html" in the browser than "index.php"
December 10, 200817 yr Does the server only know that it needs to pre-process the file by the .php extension, or will it parse code embedded in a file that ends .html? You can make Apache parse HTML files as PHP with this line (IIRC): AddHandler application/x-httpd-php .html In terms of user experience I think it's a little more comforting to see "index.html" in the browser than "index.php" I've been using PHP for about 4 years and I don't think anyone has ever complained about .php over .html - most people haven't a clue what it means. If you want real user-friendliness, in theory you should just remove extensions altogether (in the URL, obviously not on the file).
December 10, 200817 yr Which is the best PHP vs HTML? What is the difference between them both. I know the HTML works better on SEO than php (correct me if i am wrong). I always disguise my php pages using mod rewrite in htaccess, so a page like /index.php?page=home reads /home.html. I'm not even sure how this affects SEO, but it keeps my pages inline with most of the web and what most are familiar with. Coding links is tidier too.
December 10, 200817 yr u can't compare them. Trying to compare php and html is like comparing a car to a GPS. They do completely different jobs, but need each other to build something usefull. Php isn't needed but it adds interactivity and dynamic content and is very much wanted now-a-days. Just learn html and how to create static webpages then learn how to integrate php and databases (MYSQL).
December 14, 200817 yr You need to think of it like this... php generally is the function of how an engine works in a car. html is the nuts n bolts that put the car together. css is how the car looks. this means.. php is typically function.. ie login, user signup, search functions, etc etc. html is the structure of how the page will be composed. css is the positioning, design, colors, everything that truly affects how the page is looking. so.. and excuse me i tend to over explain. but php is how we are able to post our threads. html/css is why we see all the pretty colors/designs on this page. hope that helps.
December 14, 200817 yr This isnt really a poll, the pole should be PHP vs ASP. If that were the case, I would vote PHP! On another note, html is what php would put out. Not to mention about SEO, that also doesnt make sense. If you create something in PHP to output certain tags or other things which would be in an html tag format. Therefore SEO is going to read the HTML tag. Thing this poll should be reviewed, and resubmitted! POLL: What do you all think? PHP vs ASP?
December 14, 200817 yr Upon reading the title of the thread, I was about to post pretty much what everyone else has just said. Oh well, i'll say it anyway. PHP and HTML are too totally different languages. HTML is responsible for creating the structure of a page and PHP is used to control dynamic actions of a page. To put it simply, you can't structure pages entirely in PHP and you can't create dynamic pages entirely with HTML. They're both too different to attempt to compare and decide which is 'better'. What do you all think? PHP vs ASP? PHP by far. I absolutely HATE ASP.
December 15, 200817 yr Php and HTML are totally different. I prefer PHP because more options are possible with it.
December 15, 200817 yr I don't really see them as something that you can define between, you use them in unison to produce a dynamic website, however I've chosen XHTML because XHTML/CSS will always look good, whereas PHP needs XHTML to look good, if you see what I mean.
December 30, 200817 yr PHP and HTML can work together, and don't worry about SEO if you know the way how to use PHP script inside HTML tags. ^ ^
January 1, 200917 yr This page has quite a good explanation on the difference between the two. (although alot of it has been repeated about 600 times in this single thread)
January 3, 200917 yr I know we have already had this discussion before! This cannot be compared, and the person who person who put this on here should be deleted.
Create an account or sign in to comment