Safety Precautions, Measures While Editing a Template

Safety Precautions, Measures While Editing a Template-HTML editing is such a job in which special care and alert Ness is required. In the HTML editing job we either change/replace the existing codes or add a new code and during this process if we make even a minor mistake, our addition or alteration will not be accepted. The template will neither be saved nor a preview will be displayed but an error code message will be displayed. The line where the error has been occurred will be highlighted. If the code or string we altered or added new is a smaller one we can remember and rectify the error but if it is a big one we may face difficulty . In my view we can take the following precautions  while editing HTML document –

Remember the line number while Editing HTML Document

Now all the blogger templates template display line numbers in the left hand margin so while adding/altering anything in the blogger you can use the line numbers. I mean to say remember the starting and ending lines between which you have placed/altered the code. This is a simple way

Separate the HTML code by a comments

You can separate the newly added/ altered codes by comments. Comment tags inserted in source code are not displayed in the browsers. You can explain your code using comments which will help you editing your source code later. An example of separating by comments is given below. Supposing you want to add the following code to tour HTML document –

#related-posts a:hover{background: #0000FF;}
#related-posts h2{margin-top: 6px;background:#00FF66;font:24px Oswald;padding:5px;color:#000000; text-transform:uppercase;}

You can separate it by comments like this

                <! Your comment here-->
#related-posts a:hover{background: #0000FF;}
#related-posts h2{margin-top: 6px;background:#00FF66;font:24px Oswald;padding:5px;color:#000000; text-transform:uppercase;}
<! Your comment here-->

Now while saving the template, if you receive an error message you can easily locate your recent alteration/additions.

Related Links





Reactions:

1 comment:

  1. Hi,

    You are doing. It's time to go for a premium template and domain.

    Regards

    ReplyDelete