Thursday, August 25, 2016

Blogger has a problem with the html tag 'pre'

For quite sometime I have had problem displaying HTML code in my blog as the Pre tag did not render correctly. Here I am trying to see what is happening, if any in rendering the Pre tag. I decided to show only screen shots of either the HTML tab in my blog post, or the Compose tabbed page of my blog so that the browser effects are properly seen.

When you want to create a new post in Blogger, this is the HTML code you get and the 'Compose' page is empty.

Now I enter a single line-'This is a test' in the Compose tabbed page.


The HTML markup shows this:


Now I add a 'Pre' tag as shown.


The following is the content of the 'Compose' page.

So far no problem, good.

I now go back to HTML pane. Looks OK, but it has added another repeating line at the top.


Not a big difference. I refresh the browser and everything back to as it was before refresh.
I just draw a line in 'Compose'.


The HTML after this appears as shown. It has added 'Pre' tags as shown. Why 'pre' tags which not just 'p'.


I just added a 'div' tag and I am going to place a 'Pre' tag inside the 'div' tag.


This is the 'compose' page.


I added some 'pre tag' inside the div tag

The compose  now appears as shown.

I add another div and within div I add a pre tag. In the pre tag I add special characters (HTML markup) as shown.


The Compose page after the above appears as shown.


The pre tag did not work as intended for html tags.
I revert to the HTML to see if the blogger's processor has added any thing by itself. It does some time. No change.

I add a dotted line in HTML code.


There is an expected change as shown.


I revert to HTML and I see it has changed.

This time it accommodated the dotted line inside the 'div'. I modify the page with 'code' tags as shown. Some recommendation from some of the Internet sites is to enclose it in 'code'


The 'Compose' page now appear as shown.
The extra > in the last line appears to be an error while typing.

It is getting worse!

I refresh the page and nothing is changed in 'Compose'.

I host the html page on the local IIS Server and the response is as shown.


The conclusion is  'Pre' tag is not working in the Blogger as it is supposed to.

No comments: Protection Status