- Four space indentation
- Remove trailing whitespaces and add an empty line at the end of each file
- IE 9+ Compatibility
includetemplates, notrequireor_once- Use full PHP tags, not short ones
- Don't close PHP tags on PHP only files
- Correctly format assignments for readability
<?php
include '_templates/sitewide.php';
$page['title'] = 'HTML Safe Title';
include '_templates/header.php';
$foo = bar($para, $param);
$second_foo = 42;
$third_foo = 'hey';
?>- Include
altattribute for all images - Include
titleattribute for all links - Close all your tags properly
- Try to use classes instead of IDs unless things are absolutely unique
- One selector per line
- Care with fallbacks and browsers compatibilities
.class {
color: #fefe89;
font-size: 1.1em;
}
.second-class,
.third-class {
backgound-color: white;
}git checkout -b feature_branch_name
git push -u origin feature_branch_namegit pull origin mastergit checkout feature_branch_name
git merge masterTODO