v5Tutorial Complete Blogger Tutorials

Blogger Section <b:section>

Sections can be used for made up template layout & insert widgets.
  • In the <body> tag, sections can be inserted.
  • A section can only contain widgets.
  • Sections are areas of your site, such as a header, sidebar, footer.
  • Sections is created for inserting widgets like popular post, blogroll, search box.
  • You can include any HTML around the sections in your template.

HTML b:section Syntax

Each Blogger Section in your template has opening and closing tags.

<b:section id='new'></b:section>
Note: In your published blog, all <b:section> tags will be replaced with <div> tags.

Usage of b:section Tag

Go to Template > Edit HTML.

Blogger Section: new

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

<body>
  <b:section id='new'></b:section>
</body>
</html>
new
To insert extra code within a section, split the section into two or more new sections.

Control b:section Tag

Control Blogger Section with attributes.

<b:section id='new' class='myClass1' maxwidgets='5' showaddelement='yes'></b:section>

This Blogger Section allow add or remove widget. It can add maximum 5 widgets & can be styled with CSS Class myClass1.

HTML b:section Attributes

Attribute Values Description
id name Required. Defines a name for the section
class name Optional. Defines CSS style for the section
maxwidgets number Optional. Defines maximum number of widgets to allow in this section. If you don't specify a limit, there won't be one.
showaddelement yes
no
Optional. This will show the 'Add a Gadget' link in this section. Default is "yes"
growth horizontal
vertical
Optional. This determines widgets within this section are arranged side-by-side or stacked. Default is "vertical"

Related Post

Java Scripts