Showing Your HTML___________


If you ever want to display any HTML codes for your visitors (for them to copy and paste or just for them to see), then it would be especially helpful for you if you knew atleast one of the two following codes. By placing these codes before and after the HTML code you want to display, you can allow your visitors to see the actual code in written form instead of the final product (for example, you can allow them to see the code to make a link appear instead of the link itself). And the best part of it all is that neither of the methods involve you having to waste your time placing asterisks between each letter! :)

Method One: Method one is extremely quick and is convenient if you have a short code or are only displaying a few codes at a time. It involves using XMP tags, like this:



** The box will not show up (see below for the method on how to show HTML coding inside a textarea). Instead, your code will look like this:
<a href="index-2.html">
Notice how if you would've done that without the XMP tag, the link itself would've shown up instead of the code. Also, it's very important that if you're using the XMP tag, that before the XMP tag you specify a font size because without one the code will show up extra small!


Method Two: Method two is what I've used on most of my tutorial layouts. It involves placing the code that you want your viewers to see inside of a box (aka a "text area", which is used above). It's especially helpful if you're displaying a long code (such as Javascript or CSS). However, I wouldn't recommend using this method until you've become familiar with text areas and how to customize them to fit your site's needs.

To make a text area, you must put the text area code before and after the HTML coding, just like the method above.
<textarea> HTML coding goes here </textarea>
As usual you replace "HTML coding goes here" with the actual code of whatever you want to display. Your final product should look like this:



Remember to close all of your tags! Otherwise the code won't work

YaY all done! :)
Hosted by www.Geocities.ws

1