How to properly deal with CSS, JS, and HTML codes in Blogger


Many Blogger users follow the explanations for adding and distributing plugins without knowing why this distribution is done and how it is distributed by itself or combining the add-on codes together

Therefore, in our topic today we will explain how CSS, Js, and HTML codes are distributed in the Blogger platform. Of course, we will not go into purely programming matters, but we will talk in general terms that suit everyone in understanding the matter.

Why are some tools distributed and others added in one HTML / JavaScript tool?

Light tools are easy to read easily within an HTML / JavaScript tool. Large tools are sometimes difficult to read and operate when they are inside a tool, and at that time they are not working, so they are distributed in areas of each code within the template to ensure its work.

Of course, this is differentiated according to the quality of the template's encoding and the number of tools in it. A template full of Java files will need merging more than others to avoid inconsistency.

CSS styling codes

These codes are responsible for the appearance, colors and shapes of the tool. You can distinguish its codes as being written in these ways

#Example {
margin:0 5px;
أو تكتب هكذا
#Example {margin:0 5px;background-color:#127B1F;}

The place of these codes in the template is between two codes

<b: skin> <! [CDATA [/ *

]]> </ b: skin>

But if you want to use these codes in the HTML / JavaScript tool or in another area of the template, for example the head area above the tag


Or in the body area, i.e. between the two tags



You have to tell the template that these are style codes by placing it between these two codes

<style type='text/css'>
الكود هنا

Javascript JS codes

They are the codes responsible for the commands, I mean when you click on a certain thing in a tool, these are the codes that convert your pressure to do a specific thing on the page

You can add them over the head area or in the body area, but in any case you have to tell the template that they are Java files by placing them between these two codes

<script type='text/javascript'>الكود هنا </script>

I mean, if you have a Java file and you cannot upload it, transfer its content inside these two codes sometimes it may not be accepted, so you must convert it with a code converter

HTML codes

They are the codes responsible for planning that determine where the plugins are located on the page and its parts, and it is always only in the body area and you can distinguish it by that its codes are full of brackets like this

<div class="example">

After we understood the idea of ​​these codes, how to add them in the template, their work areas, and how to change the area of ​​adding them, such as the style codes

Now these are tools you can practice with

The first is this slider. You will find distributed codes. You can add tags to the style area. You can group all the codes together and add them in the HTML / JavaScript tool.

Of course, he may not work with you in a tool because of the reasons you mentioned previously, or he may work according to your template

This is another slider that is not distributed. If you want to distribute it in the template, use its codes and distribute them

How to create an error page or redirect to another page in Blogger

How to add code within the framework of selecting all in the blogger blog