For code layout, we should always use four spaces per indentation level. Spaces are preferred over tabs, but even if you use tabs, just avoid mixing tabs and spaces in the same file. Let's take a look at an example in the following code block:
pragma solidity 0.5.0;
contract Gaming {
function determineWinner() public(){
if (guess == true){
return true;
}
else if (guess == false){
return false;
}
}
}
We can see the contract as specified first, then the first function declared is indented by four spaces. The if block itself is indented four spaces from there.