HTML or PHP?
A few days ago I read an interesting question on a forum. What is better for SEO: PHP or HTML? In order to answer this question we must first know exactly what PHP and HTML are, when we use them and how a web-spider interprets them.
HTML stands for Hypertext Markup Language. Actually it is a text file that is interpretated by the web browser as a web page. It can’t do anything dynamically on it’s own. On the other hand, PHP is a programing language. PHGP can do things dynamically, can interact with variables, can interrogate data bases and can interact with the server. BUT PHP is not rendered by the web browser.
As strange as it sounds, php actually is rendered by the server as HTML. When you open a PHP file in your browser, the server runs the PHP script that actually returns HTML code. This HTML code is what the browser renders as a web page. You don’t have access to the PHP source from your browser. That is exactly why you can’t even run PHP files on your computer if you don’t have PHP server installed that know how to run PHP scripts.
But I still did not answer the question: Is it better to make a website in PHP or in HTML? If you want a complex website, with dynamic content and user registration and stuff like that, than you can do this only in PHP (or ASP.NET - another web programing language). If you only want something simple with a few pages and a few images, than HTML will do the trick.
But what about for SEO? It doesn’t matter. The web crawler doesn’t have access to your PHP file and can only see the HTML page that is rendered by running the PHP script. So even if you make a dynamic page in PHP or a static page in HTML, the outpus is simple HTML and the spider can only see this.
