Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 9th, 2012  |  syntax: None  |  size: 0.55 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Is there a HTML/CSS way to display HTML tags without parsing?
  2. //This used to NOT PARSE HTML even if you used standard < and >.
  3. <XMP>
  4. <a hred="http://example.com">Link</a>
  5. </XMP>
  6.  
  7. //New PRE tag requires < and > as replacement for < and >.
  8. <PRE>
  9. &#60;a href="http://example.com"&#62;Link&#60;/A&#62;
  10. </PRE>
  11.        
  12. <div id="text">
  13.     <a href="">This is an anchor</a>
  14. </div>
  15.  
  16. <script>
  17.     var t = $('#text'); t.html(t.text());
  18. </script>
  19.        
  20. <style>
  21. script {
  22.   display: block;
  23. }
  24. </style>
  25. Then within document body:
  26. <script type="text/plain">
  27. <i>&eacute;</i>
  28. </script>