proper html & php code style proposal

encourage developers to keep their code readable, valid and cross-browser compatible


Code should always be readable for others. Making use of a strict line indent, comments and DocBlocks make sure everybody is able to understand what the code does and is able to find specific spots faster.

read more


Keep your code valid. Don't missuse HTML-tags, put tags into attributes or try to glitch an effect through bugs or invalid HTML. Stick to your HTML standard, for example closing single tags in HTML4 and HTML5: <br> and in XHTML: <br />

read more


Ensure to deliver the same quality of webservice to as much visitors as possible. Don't use for example document.location, using the property works in almost all browsers, but the correct usage is window.location.

read more


Most important for PHP is to use Design Patterns, sanitize and validate input, and to keep the code readable and OOP with Exceptions. Our advice is to stick to the Zend Coding Style Guide. As mysqli_* functions are deprecated, you should also switch to MySQLi or PDO.

read more