Close

×

Tutorials

Blogger Tutorial

Start Blogger

Templates

Blogger Templates

Recent Post Popular Post Featured Post Related Post

nayan ad

Share


Like
×

Top Navigation Menu

×

Search v5Blogger

Powered by Google

Blogger <b:widget> Tag

Widgets are small tools or applications that can be added to enhance blogs content.
  • Widgets are used to add feture in a blog.
  • Design and add content in blogs using widgets.
  • Drag-and-drop system available for rearange widgets. 
  • Widgets, also known as gadgets.

HTML b:widget Syntax

Each Blogger b:widget in your template has opening and closing tags.

<b:widget id='CustomSearch1' title='Search' type='CustomSearch'></b:widget>
Note: In your published blog, all <b:widget> tags will be replaced with <div> tags.

Usage of b:widget Tag

Go to Template > Edit HTML.

Blogger Widget: Search

<html>
<head>
<title><data:blog.pageTitle/></title>
<b:skin/>
</head>

<body>
  <b:section id='new'>
    <b:widget id='CustomSearch1' title='Search' type='CustomSearch'></b:widget>
  </b:section>
</body>
</html>
new
Search
Search Box gadget
Best pratcice to add default Blogger widgets from Layout > Add a Gadget.

Control b:widget Tag

Configer Blogger b:widget with attributes.

<b:widget id='CustomSearch1' class='myClass2' locked='false' title='Search' type='CustomSearch' visible='true'></b:widget>

This Blogger b:widget can be removed from layout. It will be visible in blog & it can be styled with CSS Class myClass2.

HTML b:widget Attributes

Attribute Values Description
id name Required. Defines a name for the section
type name Required. Indicates the kind of widget.
class name Optional. Defines CSS style for the section
locked yes
no
Optional. A locked widget cannot be moved or deleted from the Layout tab. Default is "no"
title name Optional. Defines title for the widget. If no title is specified, a default title such as "List1" will be used.
pageType all
archive
main
item
Optional. The widget will display only on the designated pages of your blog. Default is "all"
mobile yes
no
default
Optional. This decides if the widget will be displayed on mobile or not. Only Header, Blog, Profile, PageList, AdSense, Attribution will be displayed on mobile when the mobile attribute is "default"

Footer Note

v5 Blogger is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2016. All Rights Reserved.
Powered by W3.CSS.

v5 Library