Skip to main content

Showing Code on Your Webpage

Showing Code on Your Webpage

I am not a computer geek. I just learn by experience and trial and error and find stuff that works. Sometimes we want to show code on the page. If we just write this in the usual way it won't show because it is active. I have found two ways of presenting code on the page. The first is to change the symbols such as "<" or ">" (the beginning and end of the tags) with a replacement symbol. They are set out below.
What you want to showWhat you replace it with
'&apos; (except IE)

For example, for the title tag <title> you type in &lt;title&gt;

The second way is easier - use Google Docs. Just prepare the Blogger post in Google Docs and ignore any problems with code. Type it as if it was ordinary text. Then publish the document to Blogger per these instructions. This page was prepared in Google Docs.

Here is some code that makes a simple table that I just dumped into this page:

<table style="text-align: left; width: 50%;"
border="1" cellpadding="2" cellspacing="2">

What happens is this. When the document is published from Google Docs to Google Blogger the active code is deactivated. In the compose window you will see all the symbols changed automatically for you! Man, this is cool as it saves so much time and is far more accurate. It is very fiddly substituting bits of code with odd meaningless letters and symbols.

P.S. Thanks to for the list of code subsitutions in the table on this page.


Popular posts from this blog

Cat Ear Mites

Brown gunge. Yes, I know this is a ferret! It does show the build up of dark brown to black ear wax caused by the presence of the cat ear mites in the outer ear canal. This parasite is not restricted to the domestic cat, which makes this photo valid and a useful illustration (I was unable to find a suitable photo of a cat with the condition). Photo Stacy Lynn Baum under a creative commons license. Ear mites (minute crab like creatures) are one of the causes of inflammation of the outer ear canal (scientific term for this inflammation is Otitis externa ). The outer ear canal is the tube that runs from outside to the ear drum (the pathway for the reception of sound), which can be seen when looking at the ear. Otitis externa affects humans and often swimmers as it is called "swimmer's ear" in humans. This YouTube video show ear mites under a microscope. They are not actually in the ear in this video. There are many possible causes of Otitis externa in c

Feline Mange

I'll write about three types of feline mange (a) feline scabies or head mange (b) demodectic mange and (c) sarcoptic mange. The source material is from Cat Owner's Home Veterinary Handbook - the best on the market . Generalised feline mange? Puerto Rico - Photo by Gotham City Lost And Found Feline Scabies - head mange Head mange or feline scabies, is a fairly rare condition in cats, which is caused by the Notoedres mite (head mite) that only reproduces on cats. The female mites burrow a few millimeters (that is a lot) into the skin around the head, and neck to lay eggs, which hatch and lay their own eggs. Their presence and activities causes intense itching that in turn causes the cat to scratch. The scratching will obviously be noticed and it will cause the skin to become red, scratched and worse infected. Symptoms: hair loss and scabs, thick wrinkled skin and grey/yellow crusts form plus the symptoms of scratching. Feline mange (head mange) is contagious and tr

Cat Anatomy

Cat Anatomy - Photo by Curious Expeditions . The picture above was taken at Wax Anatomical Models at La Specola in Florence, Italy. The photograph is published under a creative commons license kindly granted by the photographer. I am sorry if it is a bit gruesome. It is pretty well all I could find as an illustration that was licensed for publication. Cat Anatomy is a very wide ranging subject. The anatomy of a cat is very similar to human anatomy. If you were writing a biology book for students of biology you would go through every part of the a cat's anatomy in some detail. It would be similar to writing a book about the human anatomy. It would be a thick book and pretty boring for your average internet surfer. So, how do you limit such a big subject and make this post meaningful? The answer I think lies in doing two things: Having a quick general look at cat anatomy - an overview and; Focusing on the areas of cat anatomy that are particular to the cat and of parti