Blogger theme creation guide for beginners: blogger blank page

This beginner's guide to creating a Blogger theme covers the basic structure of XML code used in Blogger, as well as how to customize CSS to create a beautiful and responsive blog design. It also introduces key elements such as the header, content, sidebar, and footer, along with examples of how to use various widgets in Blogger, making it easier for readers to understand and apply them to their own theme development.
Empty Blogger Theme
list of contents show

This beginner's guide to creating a Blogger theme covers the basic structure of XML code used in Blogger, as well as how to customize CSS to create a beautiful and responsive blog design. It also introduces key elements such as the header, content, sidebar, and footer, along with examples of how to use various widgets in Blogger, making it easier for readers to understand and apply them to their own theme development.

—– css Yours here —– Enter your css here.


This code is The most basic structure of the Blogger theme together with:

  • Blogger HTML + namespace layout
  • Meta for mobile/desktop
  • Retrieving blog data such as page names
  • Area for inserting CSS
  • One section for inserting widgets
  • Add credit below

Simple and easy to use for creating minimal Blogger templates.

✔ This section is for declaring XML and defining namespaces.

  • xmlns:b = Used for Blogger tags such as: <b:if>, <b:section>
  • xmlns:data = Used to extract data from blogs such as data:blog.pageTitle
  • xmlns:expr = Used to process various expressions.

✔ Set Internet Explorer to display like IE7

✔ Set split screen size for mobile / desktop

  • If it's a mobile phone → use a responsive viewport.
  • If it is a desktop → set the width to 1100px.

✔ Tell Blogger to include content <head> Blogger Standards

  • Such as automatic scripts, various meta tags

✔ Name the web page from the blog page name.

  • Use the data that Blogger automatically generates for you.

✔ Section for inserting theme CSS

  • <![CDATA[ ]]> = Used to insert code that cannot be directly processed by XML, such as CSS.

✔ Blogger's main content display section

  • <b:section> This is the section where we can add widgets.
  • showaddelement='yes' = Allows you to add gadgets to the layout.

✔ Close HTML structure


<!– Header –> ส่วนหัวเมนู

<!– Content –> ส่วนนี้คือการดึงโพสมาแสดง

<!– Footer –> ส่วนท้าย

🧱 Website top (Header)

<header>
  <h1><data:blog.title/></h1>
  <nav>
    <ul>
      <li><a expr:href='data:blog.homepageUrl'>Home</a></li>
      <li><a href='#'>About</a></li>
      <li><a href='#'>Contact</a></li>
    </ul>
  </nav>
</header>

📰 Content Section

<div class="container">
  <b:section id='main' class='main' showaddelement='yes'>
    <b:widget id='Blog1' type='Blog' title='Blog Posts' visible='true'/>
  </b:section>
</div>

Content section How does it work?

  • <b:section> = Widget area (arranged through Layout in Blogger)
  • <b:widget type="Blog"> = Show Blogger posts
  • Blogger will generate internal HTML such as:
    • Home page posts list
    • Full article on the post page

📘 Footer

<footer>
  <p>© <data:blog.title/> - Powered by Blogger</p>
  <p><a href='//siammakemoney.com'>siammakemoney.com</a></p>
</footer>

2.1 Structure in various Bloggers

2.2 Add a Blogger title


Sidebar Gadgets/Widgets In Blogger theme we need to add <b:section> Keep in <body> Beside main (Post display section)

✅ 3.1. XML declaration and namespace section

explain
  • <?xml ...?> → It says it is an XML file that Blogger uses to convert to HTML.
  • xmlns:b → Used for Blogger tags such as: <b:section>, <b:widget>
  • xmlns:data → Used to extract data such as <data:blog.title/>
  • xmlns:expr → Use to insert expressions such as expr:href='data:blog.url'

✅ 3.2. <head> Website header

3.2.1 Supports older Internet Explorer
3.2.2 Mobile/Desktop Viewport

How does it work?

  • If you access the website on your mobile phone → use the mobile friendly viewport.
  • If it is a desktop → use full screen.
3.2.3 Auto-load Blogger header

together with:

  • Article meta
  • Open Graph
  • Basic Schema
  • Feed
    Very important, do not delete.
3.2.4 Pull the page name as <title>
3.2.5 Load Google Fonts

🎨3.3 All CSS (inside <b:skin>)

Blogger must include CSS inside. <b:skin> only


🧱 4. Website Header

explain
  • <data:blog.title/> → Blog name
  • Menu arranged from left to right
  • CSS Sticky Header

📰 5. Content Container Layout

5.1 Main Content

It is the heart of Blogger.
show:

  • Post list
  • Full article
  • pagination
5.2 Sidebar

You can add widgets from the layout such as:

  • Popular Posts
  • HTML/JavaScript
  • Labels
  • Ads

🧩 6. Footer

explain
  • Automatically retrieve the year and name of the blog
  • Add credit
  • The background color is black.

⬆️ 7. Back-to-Top Button

Usually, there must be some JS as well, such as:

partDoing what?
XML NamespaceEnable Blogger tags
ViewportResponsive
all-head-contentSEO + Meta auto from Blogger
CSSDesign the entire layout
HeaderLogo + Menu
Container2-column grid
Blog1Show blog posts
SidebarPlace widgets as desired.
FooterCopyright notice
Back-to-TopBack button

<!– Sidebar (ซ้าย) –>

<!– Main content (ขวา) –>

🔷 Overview of the code in this theme

This is 2-column Blogger template (Sidebar + Main) With:

  • Header sticky
  • Sidebar fixed width (300px)
  • Main content flexible
  • Post card design
  • Footer
  • Back-to-top button
  • Responsive layout
  • Pull post through <b:widget type="Blog">

🔶 4.1. XML declaration and namespace section

<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:b='http://www.google.com/2005/gml/b'
      xmlns:data='http://www.google.com/2005/gml/data'
      xmlns:expr='http://www.google.com/2005/gml/expr'>

✔ Explain

This is The main structure that bloggers must use:

namespaceduty
b:Use Blogger's system tags such as: <b:section>, <b:widget>
data:Pull data such as <data:blog.title/>
expr:Writing expressions such as: expr:href="data:blog.homepageUrl"

🔶 4.2. <head> — Web header

✔4.2.1 Viewport for mobile

✔ 4.2.2 Add Blogger's auto-generated meta and scripts

Blogger will automatically add the following:

  • Title / Description of the page
  • OpenGraph
  • Article Schema
  • Canonical URL
  • Feed
  • CSS widget

It is an important part, do not delete it.


✔ 4.2.3 Page Title

Pull names by page, such as:

  • Home → Blog Name
  • Post display page → Post name
  • Page with label → Label name

✔ 4.2.4 Download Google Fonts

Set the font across the site


🔶 4.3. <b:skin> — CSS section of the template

Blogger must include all CSS inside <b:skin><![CDATA[ ... ]]></b:skin>


✔ 4.3.1 Define the main style of the website.

Set background color, font, text color


✔ 4.3.2 Header Sticky

When scrolling → Header is attached to the top


✔ 4.3.3 Navigation Menu

Horizontal menu with Flexbox


✔ 4.3.4 2-column layout structure
columnWidth
SidebarFixed 300px
Main content1fr (fully stretchable)

✔ 4.3.5 Post Card (for article list)

Create beautiful postcards


✔ 4.3.6 Sidebar Box

Sidebar has a card-like style.


✔ 4.3.7 Footer

✔ 4.3.8 Back-to-top button

Hide the buttons for now.


✔4.3.9 Responsive Mobile

Mobile → Change to 1 column


🔶 4.4 parts <body>


✔ Header

Pull the blog name to display


✔ Layout: Sidebar + Main
📌 Sidebar

is Widget Placement Area such as:

  • Popular post
  • Label
  • HTML/JS
  • Profile

Users added via Blogger's Layout page


📌 Main Content

This is the heart of the template.
Display:

  • Post list
  • Full article
  • picture
  • Pagination
  • Comment form

✔ Footer

✔ Back-to-top Button + Script
button
Working Script

Condition: Scroll down > 200px → Show button

When clicked → smooth scroll back to the top


✨ Summary of what this code does

partHow does it work?
XML NamespaceEnable Blogger tags
ViewportMake a responsive website
all-head-contentAutomatic SEO meta
HeaderSticky + Navigation
Container2-column grid layout
SidebarPlace widgets from the Layout page
Main sectionAutomatically display blog posts
CSSDesign the entire UI
ResponsiveOptimized layout for mobile
Back-to-topAuto scroll up button

–primary-color: #008f7a; /* Primary color, editable /

–layout-max-width: 1200px; / Adjust layout width /

–sidebar-width: 250px; / Sidebar width */


  • (bullet point like this)


8.1 Add Font Awesome CDN (if not already available)

8.2 Add Font Awesome icon and resize it.

8.2 Add color to Font Awesome icons



สามารถใส่ script ก่อนปิด </body> หรือ หาแท็ก <head>

use & instead & always

The template must contain at least one b:section tag.

Facebook Comments Box
Previous Article

15 Free Plugins Manage Links Insert Links Shorten AFF Links on WordPress Compare