I have a php website at www.easypublicliabilityinsurance.co.uk and the way this site is setup, sends the user to www.easypublicliabilityinsurance.co.uk/index.html if you type in the domain name (as you will see if you try). Although the pages on this site show as html, they are all run on a single php file. Every page of my site has the advertising on the bottom of the left hand side column but my site is not validating on the assumption that this is due to the sending of the user from the domain to /index.html. As I can't put index.html as my validation address (only my domain), is there any way to get my site validated other than changing the way my website works?
I understand that I may not get any replies to my request for help above but just to let you know I am taking the advertising off my site for the time being. Once someone has given me some help I will consider putting it back on. The problem still remains as above. I am eager to put this back on so any help is eagerly awaited!!!
I am somewhat confused by your question. It doesn't matter what is going on behind the scenes with your site because all of your PHP outputs HTML. The user/spider/validator will only see the HTML and not even know that they are being redirected or that the page is served via PHP. That being said, the HTML you output is completely invalid. First and foremost you are missing your entire HEAD section. This includes DOCTYPE, title, etc. The rest of your site is not wrapped in html or body tags either. Until these issues are fixed your site will not validate as it has no clue what standards to validate you against.
This site has not been written by me so therefore do not know why there is no HTML, HEAD, and BODY tags. What I can say though is the code is not necessarily "invalid" as your browser should "fill" the tags in for you if they're absent meaning there exists a HTML, HEAD and BODY element even if the document doesn't explicitly specify them. I assume the page displayed correctly on your browser? Like I say I don't know why they have been left out, maybe to minimise page coding where they are not required??? Anyway, is there a way to sort out the validation on the way it has been set up or is it a case of changing to include these elements?
No browser fills up any missing tags, if the html it receives is not valid and conforming html, it will display it under quirks mode, doing its best to display it properly. So, a properly redering HTML is not neccessarily validating HTML. If you want valid HTML, there is no way that you can leave out HTML, HEAD and BODY tags.
I did use the term "fill" quite loosely but I understand what you are saying - thanks. This, I assume, means that the validation won't work unless the html is sorted?