You will probably notice here on this site that I sometimes provide example code. Getting it along with all the opening and closing brackets to display properly can be a challenge. This is because your browser will read it as html and want to parse, render, or output the html.
At some point you may want to provide or post the actual html code without rendering it either on your Dolphin web site or elsewhere. You might want to give your members an example of html code. Maybe you are posting a question and want to show the code you are using, so others can provide comment or suggestion.
There are a few ways you can do this. One option is to use textarea code. Textarea can work in many situations. It can seem slightly time-consuming, but not terribly long.
Example textarea code:
Which will actually be output in a web browser as:
Another possible option that is very simple to use is <XMP> and </XMP> tags between html code.
Example using <XMP> and </XMP> to show html code as text:
With <XMP> and </XMP> the output will be text and would look like:
Without <XMP> and </XMP> the output will be rendered html and look like:
The <XMP> and </XMP> tags can be used very quick and easy to show and post html code without rendering it as html. It is supported by most browsers. Although I cannot test them all. It is a bit faster and easier than making a textarea box.
You never know when you may need to post html code as text whether on your own site or somewhere else. Even if you don't have the need for this today, file it or bookmark it for future reference. It could come in handy or be useful for you one day.
You can manually make the brackets by using lt's and gt's such as:
< (will output a < symbol or character)and > (will output a > symbol or character)
Would be output as:
<html> <br> <head> <br> <title>My Title</title> <br> </head>
So it's easy to see how this could be time-consuming just to show some html code. The <XMP> and </XMP> tags are really the way to go for simplicity.
I post html and other code here at this site and other sites fairly often. Because the type of tutorials and blogs I post are generally related to Boonex Dolphin and other web site related tips. It is a common practice for me. I thought I'd pass this along to everyone just in case you might get some use out of it.