|
Posting HTML on Chat Boards
There are many times when you want to post an example of HTML on one of the chat boards or discussion groups but if you just type the code like this:
<a href="http://www.ourhutch.com/examples/">
then all you might get is an empty space. If you try to show the code for an actual link, like this:
<a href="http://www.ourhutch.com/examples/">click here</a>
then you get the link itself like this:
click here
So how do you show HTML code on the boards with those little pointy brackets showing correctly and not having to do contortions with extra spaces, and such, that make it hard for beginners to understand what you are trying to show them?
It's really quite easy. You use special codes known as entities. There are many entity codes which produce various printible characters that are not readily accessible from the keyboard or which, if used, produce results instead of displaying themselves. All entity codes start with an ampersand (&) and end with a semi-colon (;). In between is either a number beginning with the number or pound sign (#) or, in some cases, an abreviation of the entity name.
For HTML coding we need the two pointy brackets like this:
< and >.
These are produced using the entities:
< or < for this one: <
> or > for this one: >
In order to remember the short form name, it helps to know that 'lt' stands for 'less than' and 'gt' stands for 'greater than' (the mathematical names for these symbols). Note also that eBay boards do not support numbered entities syou you need to use < and > only.
Once you master this simple concept, you will be able to type in HTML code examples that can actually be seen as they should be. You type this:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
{description goes here}
</td></tr>
</table>
and people see this:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
{description goes here}
</td></tr>
</table>
...and another neat thing about this is that you can directly copy and paste code shown in this manner. Copying/pasting will work as you will be copying the actual < and > brackets and not the underlying < or > that creates them.
One more little trick is showing code for links, but having the link also work, like this:
<a href="http://www.ourhutch.net/examples/entities.html">click here</a>
This is accomplished by typing both the code you want to display (using entities) and the code that actually works (using brackets) like this:
<a href="http://www.ourhutch.net/examples/entities.html"> <a href="http://www.ourhutch.net/examples/entities.html">click here</a></a>
ie: the inner set of HTML codes or tags actually activate the link and the outer set with the entity codes displays the HTML so it can be seen.
It's always the right time to use good code.
[ back | top ]
|