Show the Codes



Most sites nowadays have a simple copy-and-paste method for their viewers to get the HTML codes necessary to link to their page. However, very few people actually have any information on how they did it! I've come across many sites that have asterisks within their code brackets to make the HTML codes appear on their page. This works effectively, but it's a pain for the people who are copying and pasting the codes onto their own site! Other people use parentheses instead of the brackets, but again this is aggravating for those who want to link your site. So here I'm going to show you two ways of making HTML codes show up on your page without having to insert *'s or parentheses!



The first way of doing it is how I've been doing it for quite some time. The vital code needed here is:

<xmp>

After you type that code, you type in whatever HTML stuff you want your viewers to see, and then you close it like you would most other HTML codes, with a / in front of it. So to do this:

<a href="http://www.geocities.com/SouthBeach/Sands/1634">
You'd have to type this:

<xmp><a href="http://www.geocities.com/SouthBeach/Sands/1634"></xmp>

Simple as that! This is the simplest of the two methods I'm showing you, but the only downside to using this code is that the text doesn't automatically break at the end of your screen, meaning that in order for a person to see the entire HTML code, they'd have to scroll across the screen. Here's an example of that:

<a href="http://www.geocities.com/SouthBeach/Sands/1634/index.html"><img src="http://www.geocities.com/SouthBeach/Sands/1634/banner1.html" border="0" alt="A banner that doesn't really exist, but I made up the filename just for this example"></a>
See what I mean? Now there is an easy way to eliminate that, but I'll show you that code later on in my little tutorial! ;)



This next way of putting raw HTML coding on your page took me a lot longer to find than the other method did. I finally had to go to one of my favorite web tutorial sites in order to find it! You can find a link there from the list of links I've placed on the main "HTML Stuff" page, but for now, I'll just show you what I've learned. ;)

&lt;a href="http://www.somesite.com/blahblah.html">
Did you notice the difference at the beginning of the code? Those four symbols and letters ( &, l, t, and ; ) are what keeps the HTML code from becoming "invisible"..in other words, instead of the code I wrote there becoming a link, those letters and symbols at the beginning are preventing it from reverting into a link. Actually (and don't quote me on this, because I'm not sure!), I think that combination of letters/symbols is actually a code for an opening bracket ( < ), because every time I save this page and then come back to it, everything has gone back to brackets, and so I have to re-edit everything!

You only need to put that little code as a replacement for the < brackets. And you need to do it for EVERY < you have, otherwise it won't work! But it works exactly the same as our <xmp> tag, and it won't scroll way off your screen, either! Now, if you want to make your code look nice and neat like this for example:

<a href="http://www.mysite.com">
<img src="mybanner.gif" border="0">
</a>

Then you need these very useful codes:

<PRE> and </PRE>

Put the first tag at the beginning of whatever code you want to type, and put the second tag at the end. You don't need to do anything special, like put <br> tags where you want the line to end. Just press your "Enter" (or "Return") key at the end of the line, and the <PRE> tag will do the rest! It's really really easy! And here's yet another example of what this should look like as you're typing it out:


<PRE>
&lt;a href="www.mysite.com">
&lt;img src="mybanner.gif" border="0">
&lt;/a>
</PRE>


You can take a look at my document source (click your right mouse button and then select "View Source") if you think I put in a <br> tag somewhere in there...I assure you I didn't! I did, however, have to use the <xmp> tag to make that work. But don't use that in combination with the second trick, or else it'll come out looking like it does above! And THAT's no good for the people who want to link your page! ;)



And that ends it for this little lesson. I haven't found any other sites that teach you this trick, so if you know of some people who could be in need of learning these codes, then send 'em over here to this page! Or if you feel confident enough, make a little section on your own site to teach it! We need to spread the knowledge, right? ;)

1