These series posts will summarize the codes of each important section in Blogger template, guiding readers how to use them, how to make proper comments. Thus you could save lots of time when searching for the codes you need.
(pic from: pexels.com)
1. How to Add Comments
If you often edit Blogger template, it's recommended to add proper comments for each important section, then you just have to search for the string in comments, to reach the right section.
Additionally, if you need to remove certain official codes in Blogger template, it's best not to delete the official codes. Instead, you could turn the official codes into comments, then you still have the chance to recover the official codes if necessary.
Now let's see what's the right way to make comments.
A. HTML Comments
<!-- content of comments -->
Above codes show how to add comments between HTML codes, and browsers will not display these comments on web pages.
For example, the HTML code of Blogger widget title is
But it's recommended to turn these HTML code into comments as below:
B. CSS Comments
/* content of comments */
Above codes show how to add comments between CSS codes. In Blogger template, you might see the following codes:
If you would like to change the value of color, just remember to keep the default codes in the comments, in case someday you might need to recover it:
color: #aaaaaa ; /*default value is: $(body.text.color)*/
This example is not practical actually, as we could use official tool to change the color in Blogger dashboard.
C. JS Comments
// content of comments
This is and example of comments for single line.
This is an example of comments for multiple lines.
2. Add Comments Between Blogger Language
A. Blogger Layout
Dashboard → Layout, above image shows the layout of Blogger blog, including different gadgets.
B. Blogger Language
For these Blogger gadgets(widgets), they're not composed in HTML language, but in special Blogger language.
Please refer to the official document "Page elements tags for layouts", and "Widget Tags for Layouts". In Blogger template, the codes of Blogger widgets are between these specific Blogger tags:
C. Add Comments for Widgets
The most important issue is, if you would like to make comments for Blogger widgets, be cautious of the location in Blogger template. Only make comments over here:
put your comments here
If you don't put the comments between
Above image is the example of wrong location, if you put comments as where the red square is in picture, then it's useless and will not be saved.