When you are coding, you should try to include a fair amount of spaces in your codes, etc. so that it is neat and easy to read. If your code is all jumbled up, etc. you run the risk of wasting time looking for hidden pieces of code. Now really, the main problem with this resides in HTML. Other languages require you to go to the next line for every command. So what is one method to preventing, un-organized HTML? Using a new line of code for each of your start and end tags. Observe:
<html> <head> <title> Title here </title> </head> <body> Content here... <div> blalblalblblbalblabl </div> <span> some stuff here </span> </body> </html>
Understand what I mean? By using a new line for your start and end tags, you reduce the amount of clutter. Also, here is a method for organizing <div> tags.
<html> <head> <title> Title here </title> </head> <body> <div id="wrapper"> <div class="some other class"> content goes here </div> <div class="some other class"> content goes here </div> </div> </body> </html>
In the above example, the two <div> tags are inside of a wrapper. So, we can show this by indenting the div tags so they become easier to read. Also, inbetween each section I included an extra line to help organize my codes.
Finally, I will cover inserting comments. Comments are another way to help organize your codes, especially when you include extra spacing inbetween tags, lines, etc.
<html> <head> <title> Title here </title> </head> <body> <div id="wrapper"> <!--content part one start--!> <div class="some other class"> content goes here </div> <!--content part two start--!> <div class="some other class"> content goes here </div> </div> </body> </html>
If you have any other methods you like to use for organizing your codes, then please post them here. And remember, your codes become much easier to edit, etc. the more you organize them.
I hope this helped.















