12 Principles to keep your code clean
Advantages of Clean Coding • Less amount of bugs will be there due to clean coding which will lead to better website design • With less amount of HTML code it will be easier for the developer to judge what code is doing what. • Loading time of the website will be fast • Saves time and money
Strict DOCTYPE • It is an instruction to the web browser about what version of HTML the page is written in.
• DOCTYPE Declaration
Character set & encoding characters â€˘ Properly encodation of funny characters must be done to avoid any misinterpretation
Proper indentation â€˘ Proper indentation must be done as it is easier to read and debug â€˘ Always indent one tab
Nest tags properly â€˘ Nesting of tags must be done properly â€˘ Opened tags must be closed in the reverse order. E.G. <i><b>This is my sentence of text.</b></i>
Eliminate unnecessary divs â€˘ Minimize the use of div tag â€˘ Make debugging and editing easier.
Use better naming conventions â€˘ Use meaningful naming conventions
Validate â€˘ Run the code through the olâ€™ validator machine to pick up small mistakes â€˘ Validated code is certain to outlive non-validated code.
PSD to HTML Wordpress www.psd2htmlwordpress.com Y8,Block EP,Sec – v Salt Lake, Kol – 700091,India PH : +913340200838 Email:firstname.lastname@example.org