How to Add a Back to Top Button in Blogger Blog

Written by M. Ahmir

Published on:

A good user experience is very important for any blog. When readers enjoy browsing your site, they stay longer and come back again. One small feature that can greatly improve usability is a Back to Top button.

A Back to Top button allows readers to move back to the top of a page with a single click. They do not need to scroll again using the mouse or touchpad. This feature is especially helpful for blogs that publish long articles, tutorials, or image-heavy posts.

JKSSB Aspirants Groups
WhatsApp Group Join Now
Telegram Group Join Now

In this article, you will learn how to add a Back to Top button in a Blogger blog. The steps are simple and safe to use in 2025–26. You do not need advanced coding knowledge. Just follow each step carefully.

What Is a Back to Top Button

A Back to Top button is a floating button that appears when a visitor scrolls down a page. When clicked, it smoothly moves the page back to the top.

This button:

  • Saves time for readers

  • Improves scrolling experience

  • Makes navigation easier

  • Adds a modern touch to your blog

It is commonly used on blogs with long posts, guides, or tutorials.

Why You Should Use a Back to Top Button in Blogger

Many Blogger users publish long articles. Some posts also include many images, videos, or code blocks. Scrolling back to the top manually can feel tiring.

Here are some strong reasons to use a Back to Top button:

1. Better User Experience

Readers can move quickly without effort.

2. Useful for Long Posts

Perfect for tutorials and step-by-step guides.

3. Time Saving

Visitors reach the top instantly.

4. Mobile Friendly

Helpful for users on small screens.

5. Professional Look

Adds a polished and interactive element.

Who Should Add This Button

This feature is ideal for:

  • Bloggers who write long posts

  • Educational blogs

  • Tech and tutorial blogs

  • Image or video blogs

  • News and information sites

If your posts require scrolling, this button is useful.

How the Back to Top Button Works

The button uses JavaScript and jQuery. It stays hidden at first. Once the reader scrolls down a certain distance, the button appears.

When clicked:

  • The page scrolls smoothly upward

  • The animation feels natural

  • The button hides again at the top

This behavior keeps the design clean.

How to Add Back to Top Button in Blogger Blog

Now let’s move to the practical steps. Follow the instructions exactly as written.

Step 1: Log in to Blogger

  1. Open Blogger

  2. Log in to your account

  3. Select the blog where you want to add the button

Step 2: Open the Layout Section

  1. Go to Layout

  2. Click Add a Gadget

  3. Choose HTML/JavaScript

This is where we will paste the code.

Step 3: Paste the Back to Top Button Code

Copy and paste the following code inside the gadget box.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

<script type=“text/javascript”>
var scrolltotop = {
setting: { startline:100, scrollto: 0, scrollduration:1000, fadeduration:[500, 100] },
controlHTML: ‘<img src=”URL Goes Here” />’,
controlattrs: { offsetx:5, offsety:5 },
anchorkeyword: ‘#top’,
state: { isvisible:false, shouldvisible:false },

scrollup:function(){
var dest = 0;
this.$body.animate({ scrollTop: dest }, this.setting.scrollduration);
},

keepfixed:function(){
var $window = jQuery(window);
var controlx = $window.width() – this.$control.width() – this.controlattrs.offsetx;
var controly = $window.height() – this.$control.height() – this.controlattrs.offsety;
this.$control.css({ left: controlx+‘px’, top: controly+‘px’ });
},

togglecontrol:function(){
var scrolltop = jQuery(window).scrollTop();
this.state.shouldvisible = (scrolltop >= this.setting.startline);
if (this.state.shouldvisible && !this.state.isvisible){
this.$control.animate({ opacity:1 }, this.setting.fadeduration[0]);
this.state.isvisible = true;
} else if (!this.state.shouldvisible && this.state.isvisible){
this.$control.animate({ opacity:0 }, this.setting.fadeduration[1]);
this.state.isvisible = false;
}
},

init:function(){
jQuery(document).ready(function($){
var mainobj = scrolltotop;
mainobj.$body = $(‘html,body’);
mainobj.$control = $(‘<div id=”topcontrol”>’+mainobj.controlHTML+‘</div>’)
.css({ position:‘fixed’, bottom:mainobj.controlattrs.offsety, right:mainobj.controlattrs.offsetx, opacity:0, cursor:‘pointer’ })
.attr({ title:‘Back to Top’ })
.click(function(){ mainobj.scrollup(); return false; })
.appendTo(‘body’);

$(window).scroll(function(){
mainobj.togglecontrol();
});
});
}
};
scrolltotop.init();
</script>

Step 4: Save the Gadget

After pasting the code:

  • Click Save

  • Arrange the gadget anywhere in the layout

  • Position does not affect functionality

Customize Your Back to Top Button

You can customize the button image easily.

Inside the code, find this line:

controlHTML: '<img src="URL Goes Here" />',

Replace URL Goes Here with any image URL you like.

Sample Button Image URLs

You can use any image hosted online. Below are example styles.

Gray Arrow Button

https://3.bp.blogspot.com/Jhm_YShNMoc/UujZWfBmHyI/AAAAAAAACSw/RG0ZAtfbUA8/s1600/back+to+top+Gray+arrow.png

Paw Button

https://4.bp.blogspot.com/-lgcf335g8fU/UujZe-dFarI/AAAAAAAACS4/l4NDNgJx9dI/s1600/back+to+top+paw+button.png

Circle Button

https://1.bp.blogspot.com/-_9c-eclwmUs/UujZqKk0ohI/AAAAAAAACTA/h1SgQMIdSD8/s1600/Back+to+top+Circle.png

Paste any one of these links in the code.

How the Button Appears on Your Blog

After setup:

  • The button stays hidden at the top

  • It appears when scrolling down

  • It floats at the bottom corner

  • Clicking it scrolls smoothly upward

The animation looks clean and modern.

Is This Method Safe for AdSense?

Yes. This method is:

  • Non-intrusive

  • User-friendly

  • Not misleading

  • Compliant with Google policies

It does not affect ads or content visibility.

Does It Work on Mobile Devices?

Yes. The button works on:

  • Desktop browsers

  • Tablets

  • Smartphones

It improves mobile scrolling experience.

Common Issues and Fixes

Button Not Appearing

  • Scroll further down

  • Check image URL

  • Clear browser cache

Image Not Showing

  • Use a valid HTTPS image URL

  • Check spelling errors

Page Not Scrolling

  • Ensure jQuery loads correctly

  • Avoid duplicate scripts

Tips for Best Results

  • Use a small image

  • Place button at bottom right

  • Avoid flashy designs

  • Test on multiple devices

  • Backup layout before editing

Adding a Back to Top button in Blogger is a simple upgrade that improves navigation and user comfort. It saves time for readers and makes long posts easier to explore. This article guides and shows you how to add and customize the button safely in 2025–26. Follow the steps carefully, test your blog, and enjoy a smoother browsing experience.

Happy blogging.

Leave a Comment