Add Page Element to Blogger Header and Blog Posts

You would notice under Layout -> Page Elements that there is an option to add a Page Element to the sidebar or even to the footer [depending on your template layout] but there is none for the Header and Blog Posts. Having a Add a Page Element option for the Header and Post is a good thing because it would enable to add a new picture/banner/logo or even to add Google Adsense ad at the top or bottom of your blog posts.

How to do that ?!
Firstly you need to be logged into your blogger account and then navigate yourself to: Layout -> Edit HTML. There you will see a bunch of codes, click & tick the box: Expand Widget Templates then scroll down & or even hit key combination Ctrl + F and search for this code:

<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>

Change it to the following:

<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='yes'>

You wondering what is the difference?! Well, have a proper look and you notice showaddelement='no' and showaddelement='yes' which means no=don't show element and yes=show element! Pretty obvious lol :)

After you have changed that bit, search for:

<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='no'>

Change that to:

<div id='main-wrapper'>
<b:section class='main' id='main' showaddelement='yes'>

Now click on Page Elements and you will see the added elements:



Aditional Add Page Elements

In some blogger templates, the Header is contained in the left sidebar and the main posts appear on the right. In such templates, you can Add Page Elements to the 'main-wrapper' but not at the Header. Nevertheless, you can still look at the guidelines below to Add Page Elements in the 'crosscol-wrapper' part of the template.

To do that, search for <div id='content-wrapper'>
and just below it you see the following:

<div id='crosscol-wrapper' style='text-align:center'>
<b:section class='crosscol' id='crosscol' showaddelement='no'/>
</div>

Change showaddelement to yes:

<div id='crosscol-wrapper' style='text-align:center'>
<b:section class='crosscol' id='crosscol' showaddelement='yes'/>
</div>

The code should appear in all new XML Blogger templates but in case you don't see this in your template then you can add the entire code just underneath the <div id='content-wrapper'> section. Now when you view your Layout -> Page Elements, you should see the new added elements as in the picture:



Notes & Infos:

In some blogger templates, the 'header-wrapper' may be called 'header-wrap' or somehting else. In this case you will need to search of it, just search for showaddelement and you figure out the rest.

The difference between HTML and XHTML

What is the difference between HTML and XHTML

Probably you have seen that a lot, when modifying or inserting new codes into your Blogger template, page element, or blog post, you may have seen error one of the messages: code could not be parsed, not well-formed, broken, the elements were not closed properly etc.

I know these errors can be really frustrating and really make you go mad but in fact these errors can be corrected if you understand the rules that must be adhered to in XHTML documents [ XHTML 1.0 Strict Document Type ]. Now, I willl explain some of the XHTML syntax & rules, so that you may resolve and troubleshoot the problems if these error messages should occur while you are trying to modify the codes *meaning the XHTML Template*.

XML - HTML - XHTML

I will try to keep this short so that you guys won't get confused but just so you understand about document type: when viewing the Page Source or the Source of your Blogger template, you should see this document type declaration at the top:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The terms: XML, HTML and XHTML refer to the markup language used to write the web pages and herewith I will give a short explanation:

HTML [ Hypertext Markup Language ], invented by Tim Berners-Lee, and used since the early days of internet - as most of you guys know about it.

XML [ Extensible Markup Language ] is a meta-language, used to create other markup languages. The traditional HTML was later recast to use the rules of XML and that resulted in a new XML application, called XHTML.

XHTML [ Extensible Hypertext Markup Language ] rules are strict, unforgiving and also conforming when attempting to modify the template & codes which would result in error messages as stated above.

What are these rules that Blogger People should take note of?!

1. Basic Rules of XHTML

- Use All Lowercase Tags
- Nest Elements Correctly
- Always UseEnd Tags
- End Empty Elements
- Use Quotes for Values
- Give Every Attribute a Value
- Use Code for Special Characters
- Use id instead of name
- Separate Styles and Scripts
- Ensure you follow those steps

All codes need to be in lowercase since XML is case sensitive, all the element keywords and attribute names used in XHTML should be in the lowercase. For example, the template code is not this:

<TITLE>Free Templates Blogger Tips and Tricks</TITLE>

but instead it should be like this [lowercase]:

<title>Free Templates Blogger Tips and Tricksc</title>

If you have noticed, the elements and attribute names between the < and > signs have to be in the lowercase. However, the value, which in this case is “Free Template Blogger Tips”, can be in the uppercase, lowercase, or mixed case.


2. Attribute values to be in quotation marks

All the attribute values have to be enclosed either in single or double quotation marks. The following example is not accepted by XHTML:

<div id=header-wrapper>
<a href=http://freetemplatesblogger.blogspot.com>The difference between HTML and XHTML</a>
<img src=photo.jpg/>
<table width=200 border=0 cellpadding=2>

Instead, single quotation as such:

<div id='header-wrapper'>
<a href='http://freetemplatesblogger.blogspot.com'>The difference between HTML and XHTML</a>
<img src='photo.jpg'/>
<table width='200' border='0' cellpadding='2'>

Or, double quotation as such:

<div id="header-wrapper">
<a href="http://freetemplatesblogger.blogspot.com">The difference between HTML and XHTML</a>
<img src="photo.jpg"/>
<table width="200" border="0" cellpadding="2">


3. Container elements must have closing tags

This is not acceptable:

<p>A paragraph

In XHTML, there must be a closing tag with a forward slash / at the end:

<p>A paragraph.></p>

Here are some other examples of the many non-empty elements that have opening and corresponding closing tags are:

<ul> ... </ul>
<li> ... </li>
<table> ... </table>
<h2> ... </h2>
<div> ... </div>
<span> ... </span>
<dt> ... </dt>
<dd> ... </dd>
<a href> ... </a>


4. Standalone elements to be closed

Some of the elements are empty or standalone. They do not have associated closing tags and common examples are:

<br>
<img>
<input>
<frame>
<hr>
<meta>
<link>

In XHTML, these elements must be terminated or closed. There are two ways to do that: One way to terminate the element is to put a forward slash / at the end like this:

<br/>
<img/>
<input/>
<frame/>
<hr/>
<meta/>
<link/>

The second way is to add a corresponding closing tag like this:

<br> ... </br>
<img> ... </img>
<input> ... </input>
<frame> ... </frame>
<hr> ... </hr>
<meta> ... </meta>
<link> ... </link>


5. Elements to be properly nested

The elements must be closed in the reverse order. This code is not accepted in XHTML:

<form><table> ... </form></table>

Why is it not accepted!? Simply because, it is improperly nested! As you notice, the form was created first followed by the table and to close them in the proper order, the table must be closed before the form:

<form><table> ... </table></form>


6. Document to have only one root element

In the XHTML document all the codes are nested between <html< and </html<. That's what you call a root element and all other elements or sub elements are in between. The document structure will look like this:

<html>
<head> ... </head>
<body> ... </body>
</html>


7. Attribute minimization is not allowed

In XHTML, all attributes should single or double quoated like this name="value". Even if the value is the same as the name, it cannot be minimized to one word. Here an two examples:

<textarea readonly>Hyperlink Code</textarea>

<textarea readonly="readonly">Hyperlink Code</textarea>


Conclusion

The next time you see an error message on your blog, take a look at your codes and see if it is well formed, well parsed, properly closed, etc. Troubleshoot the problem and try out the possible solutions as you have just learned (hopefully).

Blogger HTML Meta Description and Keywords Tags

Meta Keywords and Description Tags are really important in SEO, especialy when we want our blog / site to be listed within the search engines like google.

In this post you will learn which Meta Tags you will need and also where exactly to place them! Don't worry... it's not as difficult as you may think :)

By default Blogger Page Title is defined by:

<title><$BlogPageTitle$></title>

1. To make a big story to a short story... simply copy the Meta Tags code from the table below and optimise&change the title/keywors/description into your words.

<title><$BlogPageTitle$>Page Title of your Blogger</title>
<meta name="keywords" content="Keywords only, ok" />
<meta name="description" content="Short dicription about your blog" />


2. Find <title><$BlogPageTitle$></title> and delete it

4. Paste the new Blogger Meta Tags as seen on the picture below:












5. Finally save the template and you are done !

Also you can check out the post "Blogger XML Meta Description and Keywords" in case you are working on the Blogger XML Template. Have fun.

Blogger Permalink for a better SEO

Blogger Hack for better permalink SEO

The previous post was about a mod Blogger Meta Description - Keyword Tags, which would allow the search eangine to craw through your blog into more sections: Index, Posts, Archives. In this post you will get another simple blogger hack for better SEO !

Search engines like Google love keywords in Title and the URL, but in blogger the file name or the permalink of the post is based on the post Title you give/write. For example if the title is "Blogger Meta Description and Keywords Tags" then the link by default becomes to:

http://blogspot.com/blogger-meta-description-and-keywords.html - by removing any special characters.

You may think "well I am gonna write many keywords to the Title" but bear in mind that the title length is optimized/restricted to a curtain length - as well as - the Title would look too silly and too boring for the eye catching effect!

Here is a simple solution:

1) Give the post the title with the Keywords coming in first, so if you are writing a post on Blogger Hacks and Templates then make sure to include them in the first 5 words.

2) Publish the post then click edit post.

3) Now change the title to something a little more catchy and publish the post again !

NEVER STUFF THE TITLE WITH UNNECESSARY KEYWORD WHICH LAND YOU ON THE BAD BOOKS OF SEARCH ENGINE

Yep, that's all and you are done!