Display XML content in HTML page

Simple solution is to embed inside of a <textarea> element, which will preserve both the formatting and the angle brackets. I have also removed the border with style=”border:none;” which makes the textarea invisible. Here is a sample: http://jsfiddle.net/y9fqf/1/

HTML Display Current date

Here’s one way. You have to get the individual components from the date object (day, month & year) and then build and format the string however you wish. Expand snippet