Principles for writing better HTML code
Upcoming SlideShare
Loading in...5
×
 

Principles for writing better HTML code

on

  • 714 views

This pdf is made by http://www.psd2htmlwordpress.com/ generating the ideas for

This pdf is made by http://www.psd2htmlwordpress.com/ generating the ideas for
writing clean HTML code

Statistics

Views

Total Views
714
Views on SlideShare
714
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Principles for writing better HTML code Principles for writing better HTML code Presentation Transcript

  • 12 Principles to keep your code clean By http://www.psd2htmlwordpress.com
  • 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 View slide
  • Character set & encoding characters• Properly encodation of funny characters must be done to avoid any misinterpretation View slide
  • Proper indentation• Proper indentation must be done as it is easier to read and debug• Always indent one tab
  • Keep your CSS and JavaScript external• Use external CSS and JavaScript• Future pages can link to them• Changing the design on multiple pages become easy
  • 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.
  • Contact InfoPSD to HTML Wordpresswww.psd2htmlwordpress.com Y8,Block EP,Sec – vSalt Lake, Kol – 700091,IndiaPH : +913340200838Email:info@psd2htmlwordpress.com
  • Thank You